shift of signed int, s int overflow

This commit is contained in:
Nikita Edel
2026-03-11 13:33:49 +01:00
parent 63e4b9b18a
commit 8395277c0c
17 changed files with 79 additions and 65 deletions

View File

@@ -1221,7 +1221,7 @@ bool ConsoleSaveFileSplit::GetNumericIdentifierFromName(const std::wstring &file
swscanf_s(body, L"%d.%d.mcr", &x, &z );
// Pack full id
id |= ( ( x << 8 ) & 0x0000ff00 );
id |= ( ( (unsigned int) x << 8 ) & 0x0000ff00 );
id |= ( z & 0x000000ff );
*idOut = id;