memmap: Simplify a heuristic to avoid UB.

This commit is contained in:
BearOso 2023-04-30 15:50:03 -05:00
parent 92b7fb2e9f
commit bc98b1dee1

View File

@ -1112,7 +1112,7 @@ int CMemory::ScoreHiROM (bool8 skip_header, int32 romoff)
if (CalculatedSize > 1024 * 1024 * 3)
score += 4;
if ((1 << (buf[0xd7] - 7)) > 48)
if (buf[0xd7] > 12)
score -= 1;
if (!allASCII(&buf[0xb0], 6))