XDR incorrect encoding of uint16; tests and benchmarks

This commit is contained in:
Jakob Borg
2014-06-30 12:56:09 +02:00
parent 4f6ee7c8eb
commit 7633b9672f
7 changed files with 268 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ func (r *Reader) ReadUint16() uint16 {
return 0
}
v := uint16(r.b[1]) | uint16(r.b[0])<<8
v := uint16(r.b[3]) | uint16(r.b[2])<<8
if debug {
dl.Debugf("@0x%x: rd uint16=%d (0x%04x)", s, v, v)