In f4b40f6a096194 code was added to allow reading a (non-fraction-containing) float64 into a uint64 struct. This code depends on a new function noFrac64 to decide if the cast is legal. (There is also a noFrac32.) However, noFrac64 and noFrac32 do not return the correct result when the input is 0.0. In that case, subtracting the bias yields a negative number (which is then interpreted as a very large positive number).
The end result is that, in decoding, you can see a lot of errors like this:
assigning integer value from float64 with a fraction: 0
It should resolve this bug to just add if fbits == 0 { return true } to the beginning of noFrac32 and noFrac64.
In f4b40f6a096194 code was added to allow reading a (non-fraction-containing) float64 into a uint64 struct. This code depends on a new function
noFrac64
to decide if the cast is legal. (There is also a noFrac32.) However, noFrac64 and noFrac32 do not return the correct result when the input is 0.0. In that case, subtracting the bias yields a negative number (which is then interpreted as a very large positive number).The end result is that, in decoding, you can see a lot of errors like this:
It should resolve this bug to just add
if fbits == 0 { return true }
to the beginning of noFrac32 and noFrac64.