return early on mantissa=0

This commit is contained in:
Travis 2020-04-22 19:11:03 -05:00
parent 809a02d986
commit 432e18d571

View file

@ -451,6 +451,7 @@ func reducePrecision(sign bool, mantissa []byte, scale int64) ([]byte, int64, bo
// string, that means it's value should be 0.
if len(mantissa) == 0 {
mantissa = []byte{'0'}
return mantissa, scale, true
}
lenMantissa := len(mantissa)