Decoding error position tracking

This commit is contained in:
Thomas Pelletier
2021-03-30 21:43:57 -04:00
parent 18d45c446b
commit 32da85ab11
8 changed files with 150 additions and 34 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ func SubsliceOffset(data []byte, subslice []byte) int {
intoffset := int(offset)
if intoffset >= datap.Len {
if intoffset > datap.Len {
panic(fmt.Errorf("slice offset (%d) is farther than data length (%d)", intoffset, datap.Len))
}