vncproxy
vncproxy copied to clipboard
raw encoding should return the buff
in raw encoding func (*RawEncoding) Read(...) always return nil buff.
for y := uint16(0); y < rect.Height; y++ {
for x := uint16(0); x < rect.Width; x++ {
if bts, err := r.ReadBytes(bytesPerPixel); err != nil {
StoreBytes(bytes, bts)
return nil, err
}
}
}
StoreBytes(bytes, bts) should called outside the error assertion :
for y := uint16(0); y < rect.Height; y++ {
for x := uint16(0); x < rect.Width; x++ {
bts, err := r.ReadBytes(bytesPerPixel)
if err != nil {
return nil, err
}
StoreBytes(bytes, bts)
}
}