From eae2f49850b7cb781eefec019a6f9581b24bf13e Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Tue, 27 Feb 2024 23:22:08 +0800 Subject: [PATCH] re2 --- src/reflect/type.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reflect/type.go b/src/reflect/type.go index 15827384de..b0a3815279 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -358,7 +358,7 @@ func (t *rtype) OverflowUint(x uint64) bool { k := t.Kind() switch k { case Uint, Uintptr, Uint8, Uint16, Uint32, Uint64: - bitSize := t.Size() * 8 // ok to use v.typ_ directly as Size doesn't escape + bitSize := t.Size() * 8 trunc := (x << (64 - bitSize)) >> (64 - bitSize) return x != trunc }