COMMON: Fix invalid shift

Sign bit is at bit 15 and must go to bit 63
This commit is contained in:
Le Philousophe 2022-09-18 20:36:40 +02:00
parent a18db273a5
commit 56f07b0e78

View file

@ -99,7 +99,7 @@ void XPFloat::toDoubleBitsSafe(uint64 &result, bool &outOverflowed, Semantics se
if ((signAndExponent & 0x7fff) == 0x7fff) {
if ((mantissa & 0x7fffffffffffffffu) == 0) {
// Infinity
doubleBits = (static_cast<uint64>(signAndExponent & 0x8000) << 63) | 0x7ff0000000000000u;
doubleBits = (static_cast<uint64>(signAndExponent & 0x8000) << (63 - 15)) | 0x7ff0000000000000u;
} else {
// NaN
doubleBits = 0xffffffffffffffff;