Skip to content

Commit

Permalink
trial
Browse files Browse the repository at this point in the history
  • Loading branch information
uriziv1 committed Aug 25, 2024
1 parent 102febc commit 50e288a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ func safeIntToInt32(val int) int32 {
if val < math.MinInt32 || val > math.MaxInt32 {
panic("integer overflow")
}
if val == math.MaxInt32 {
return math.MaxInt32
}
if val == math.MinInt32 {
return math.MinInt32
}
return int32(val)
}

Expand Down

0 comments on commit 50e288a

Please sign in to comment.