From ea2b5148e506ae3c27d96ffbdb08835d2ae9e233 Mon Sep 17 00:00:00 2001 From: Benjamin Kietzman Date: Mon, 24 Nov 2025 04:26:39 -0800 Subject: [PATCH] Fix issue #8389: any nonzero byte is truthy (#8690) --- go/encode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/encode.go b/go/encode.go index a2a579812..b2f607a72 100644 --- a/go/encode.go +++ b/go/encode.go @@ -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.