Fix issue #8389: any nonzero byte is truthy (#8690)

This commit is contained in:
Benjamin Kietzman
2025-11-24 04:26:39 -08:00
committed by GitHub
parent 20548ff3b6
commit ea2b5148e5

View File

@@ -25,7 +25,7 @@ func GetByte(buf []byte) byte {
// GetBool decodes a little-endian bool from a byte slice.
func GetBool(buf []byte) bool {
return buf[0] == 1
return buf[0] != 0
}
// GetUint8 decodes a little-endian uint8 from a byte slice.