mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
COMMON: Fix invalid shift
Sign bit is at bit 15 and must go to bit 63
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user