ci: build for 32 bit, libs: fix overflow (#5700)

This commit is contained in:
Marko
2020-11-26 16:12:25 +01:00
committed by GitHub
parent 27e8cea9ce
commit 781f4badc3
4 changed files with 30 additions and 6 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ func ParseFraction(f string) (Fraction, error) {
return Fraction{}, errors.New("denominator can't be 0")
}
if numerator > math.MaxInt64 || denominator > math.MaxInt64 {
return Fraction{}, fmt.Errorf("value overflow, numerator and denominator must be less than %d", math.MaxInt64)
return Fraction{}, fmt.Errorf("value overflow, numerator and denominator must be less than %d", int64(math.MaxInt64))
}
return Fraction{Numerator: numerator, Denominator: denominator}, nil
}