Skip to content

Commit

Permalink
avoid int overflow compile errors for 32-bit target
Browse files Browse the repository at this point in the history
  • Loading branch information
philpennock committed Dec 9, 2024
1 parent 5e4cc88 commit bf928de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/asciigraph/asciigraph.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ func PlotMany(data [][]float64, options ...Option) string {
precision = 0
}

maxNumLength, minNumLength := 0, math.MaxInt64
// Beware that MaxInt64 will fail on supported 32-bit targets
maxNumLength, minNumLength := 0, math.MaxInt
var magnitudes []float64

if config.ValueFormatter == nil {
Expand Down

0 comments on commit bf928de

Please sign in to comment.