XDR incorrect encoding of uint16; tests and benchmarks
This commit is contained in:
@@ -79,10 +79,10 @@ func (w *Writer) WriteUint16(v uint16) (int, error) {
|
||||
dl.Debugf("wr uint16=%d", v)
|
||||
}
|
||||
|
||||
w.b[0] = byte(v >> 8)
|
||||
w.b[1] = byte(v)
|
||||
w.b[2] = 0
|
||||
w.b[3] = 0
|
||||
w.b[0] = 0
|
||||
w.b[1] = 0
|
||||
w.b[2] = byte(v >> 8)
|
||||
w.b[3] = byte(v)
|
||||
|
||||
var l int
|
||||
l, w.err = w.w.Write(w.b[:4])
|
||||
|
||||
Reference in New Issue
Block a user