2
0

Figures out tid binary wire formatting

This commit is contained in:
Manni Wood
2016-09-11 17:33:34 -04:00
parent 72084ad1b5
commit 00bd3062e0
3 changed files with 26 additions and 8 deletions
+14
View File
@@ -60,6 +60,20 @@ func (r *ValueReader) ReadInt16() int16 {
return r.mr.readInt16()
}
func (r *ValueReader) ReadUint16() uint16 {
if r.err != nil {
return 0
}
r.valueBytesRemaining -= 2
if r.valueBytesRemaining < 0 {
r.Fatal(errors.New("read past end of value"))
return 0
}
return r.mr.readUint16()
}
func (r *ValueReader) ReadInt32() int32 {
if r.err != nil {
return 0