[Scummvm-git-logs] scummvm master -> 56f07b0e7815a41389e4e08239bcfe6d4deab431
lephilousophe
noreply at scummvm.org
Sun Sep 18 18:37:59 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
56f07b0e78 COMMON: Fix invalid shift
Commit: 56f07b0e7815a41389e4e08239bcfe6d4deab431
https://github.com/scummvm/scummvm/commit/56f07b0e7815a41389e4e08239bcfe6d4deab431
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-18T20:37:36+02:00
Commit Message:
COMMON: Fix invalid shift
Sign bit is at bit 15 and must go to bit 63
Changed paths:
common/xpfloat.cpp
diff --git a/common/xpfloat.cpp b/common/xpfloat.cpp
index 15eb0b624eb..53c1c879580 100644
--- a/common/xpfloat.cpp
+++ b/common/xpfloat.cpp
@@ -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;
More information about the Scummvm-git-logs
mailing list