mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-21 23:03:44 +01:00
binary.read_double: Fix nan reading
This commit is contained in:
parent
656707b505
commit
2304cedbac
@ -64,7 +64,7 @@ function read_double(read_byte)
|
|||||||
local mantissa_bits = exponent_byte % 0x10
|
local mantissa_bits = exponent_byte % 0x10
|
||||||
exponent = exponent + (exponent_byte - mantissa_bits) / 0x10
|
exponent = exponent + (exponent_byte - mantissa_bits) / 0x10
|
||||||
mantissa = (mantissa + mantissa_bits) / 0x10
|
mantissa = (mantissa + mantissa_bits) / 0x10
|
||||||
if exponent == 0x800 then
|
if exponent == 0x7FF then
|
||||||
if mantissa == 0 then
|
if mantissa == 0 then
|
||||||
return sign * math_huge
|
return sign * math_huge
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user