From c276e7426bdec9ea0a37948e257a4ff2e643a625 Mon Sep 17 00:00:00 2001 From: Yutaka Takeda Date: Sun, 7 Jan 2024 13:09:05 -0800 Subject: [PATCH] Fix build error on 32-bit platform Prevent math.MaxUint64 from being used on 32-bit platform --- codecs/av1/obu/leb128_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codecs/av1/obu/leb128_test.go b/codecs/av1/obu/leb128_test.go index aded8ca..7be26ff 100644 --- a/codecs/av1/obu/leb128_test.go +++ b/codecs/av1/obu/leb128_test.go @@ -59,7 +59,8 @@ func TestWriteToLeb128(t *testing.T) { {0, "00"}, {math.MaxUint32, "ffffffff0f"}, } - if math.MaxInt64 == int(^uint(0)>>1) { + if math.MaxInt32 != ^uint(0) { + // 64-bit platform testVectors = append(testVectors, testVector{math.MaxUint64, "ffffffffffffffffff01"}) }