2
0

handle this not like an idiot

This commit is contained in:
Karl Seguin
2014-12-24 09:16:13 +07:00
parent 8d116336c3
commit edc8216aa2
3 changed files with 4 additions and 6 deletions
+4
View File
@@ -113,6 +113,10 @@ func (r *ValueReader) ReadBytes(count int32) []byte {
return nil
}
if count == -1 {
return nil
}
r.valueBytesRemaining -= count
if r.valueBytesRemaining < 0 {
r.Fatal(errors.New("read past end of value"))