diff options
author | D G Turner | 2019-10-23 01:14:37 +0100 |
---|---|---|
committer | D G Turner | 2019-10-23 01:14:37 +0100 |
commit | 7b3672517cb1953eea7cdeadf6bf3c4b38e59161 (patch) | |
tree | 6cf7710d2f40486ea20a3ad407ba78af9762293f /engines | |
parent | 349e721847628ff33ba696d4d2302cc97f2d8036 (diff) | |
download | scummvm-rg350-7b3672517cb1953eea7cdeadf6bf3c4b38e59161.tar.gz scummvm-rg350-7b3672517cb1953eea7cdeadf6bf3c4b38e59161.tar.bz2 scummvm-rg350-7b3672517cb1953eea7cdeadf6bf3c4b38e59161.zip |
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.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cruise/function.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index 3f794c4e70..18dcaeeb50 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -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(); |