Merge pull request #16 from t-yuki/patch-1

Fix nil reference error for color map message
This commit is contained in:
Amit Bezalel 2020-01-18 10:43:10 +02:00 committed by GitHub
commit ea8f9b5109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,7 @@ type MsgSetColorMapEntries struct {
}
func (fbm *MsgSetColorMapEntries) CopyTo(r io.Reader, w io.Writer, c common.IClientConn) error {
reader := &common.RfbReadHelper{Reader: r}
reader := common.NewRfbReadHelper(r)
writeTo := &WriteTo{w, "MsgSetColorMapEntries.CopyTo"}
reader.Listeners.AddListener(writeTo)
_, err := fbm.Read(c, reader)