Skip to content

Commit

Permalink
Fix: Build on 32-bit arch would raise int overflow #1192 (#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
doutv authored Jul 11, 2024
1 parent d94368b commit 1da452b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/rangecheck/rangecheck_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ func (c *commitChecker) getOptimalBasewidth(api frontend.API) int {
}

func optimalWidth(countFn func(baseLength int, collected []checkedVariable) int, collected []checkedVariable) int {
min := math.MaxInt64
min := int64(math.MaxInt64)
minVal := 0
for j := 2; j < 18; j++ {
current := countFn(j, collected)
current := int64(countFn(j, collected))
if current < min {
min = current
minVal = j
Expand Down

0 comments on commit 1da452b

Please sign in to comment.