From a4e9b5f14397e095c20c9f63e33d88a8cd87bfa5 Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Tue, 27 Jun 2023 18:13:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BD=BF=E7=94=A8=20i?= =?UTF-8?q?nt=20=E5=92=8C=20math.MaxUint=20=E6=AF=94=E8=BE=83=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=BA=A2=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit math.maxUint (untyped int constant 18446744073709551615) overflows int. --- planner/configexport/internal/field_types.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/planner/configexport/internal/field_types.go b/planner/configexport/internal/field_types.go index eec05d9..e8a7e02 100644 --- a/planner/configexport/internal/field_types.go +++ b/planner/configexport/internal/field_types.go @@ -185,8 +185,6 @@ func withUintType(fieldValue string) any { value, _ := strconv.Atoi(fieldValue) if value < 0 { return uint(0) - } else if value > math.MaxUint { - return uint(math.MaxUint) } return uint(value) }