GetUOffsetT must get value by GetUint32 not GetInt32 (#6072)

This commit is contained in:
Thanabodee Charoenpiriyakij
2021-02-19 09:38:25 +07:00
committed by GitHub
parent 334c6be496
commit 54dc09e8ac

View File

@@ -118,7 +118,7 @@ func GetFloat64(buf []byte) float64 {
// GetUOffsetT decodes a little-endian UOffsetT from a byte slice.
func GetUOffsetT(buf []byte) UOffsetT {
return UOffsetT(GetInt32(buf))
return UOffsetT(GetUint32(buf))
}
// GetSOffsetT decodes a little-endian SOffsetT from a byte slice.