[Scummvm-git-logs] scummvm master -> 7b3672517cb1953eea7cdeadf6bf3c4b38e59161
digitall
547637+digitall at users.noreply.github.com
Wed Oct 23 02:19:41 CEST 2019
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:
7b3672517c CRUISE: Correct Parameter Sanity Checks in Several Functions
Commit: 7b3672517cb1953eea7cdeadf6bf3c4b38e59161
https://github.com/scummvm/scummvm/commit/7b3672517cb1953eea7cdeadf6bf3c4b38e59161
Author: D G Turner (digitall at scummvm.org)
Date: 2019-10-23T01:14:37+01:00
Commit Message:
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.
Changed paths:
engines/cruise/function.cpp
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 3f794c4..18dcaee 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();
More information about the Scummvm-git-logs
mailing list