fix: 修复使用 int 和 math.MaxUint 比较导致溢出的问题
math.maxUint (untyped int constant 18446744073709551615) overflows int.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user