mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
CRUISE: Correct Parameter Sanity Checks in Several Functions
This was flagged by GCC -Wlogical-op as the inverted logical operation was causing these checks to always return true.
This commit is contained in:
parent
349e721847
commit
7b3672517c
@ -508,7 +508,7 @@ int16 Op_LoadBackground() {
|
||||
|
||||
bgIdx = popVar();
|
||||
|
||||
if (bgIdx >= 0 || bgIdx < NBSCREENS) {
|
||||
if (bgIdx >= 0 && bgIdx < NBSCREENS) {
|
||||
strToUpper(bgName);
|
||||
|
||||
gfxModuleData_gfxWaitVSync();
|
||||
@ -553,7 +553,7 @@ int16 Op_LoadFrame() {
|
||||
param2 = popVar();
|
||||
param3 = popVar();
|
||||
|
||||
if (param3 >= 0 || param3 < NUM_FILE_ENTRIES) {
|
||||
if (param3 >= 0 && param3 < NUM_FILE_ENTRIES) {
|
||||
strToUpper(name);
|
||||
|
||||
gfxModuleData_gfxWaitVSync();
|
||||
|
Loading…
x
Reference in New Issue
Block a user