[Scummvm-cvs-logs] scummvm master -> 50c8fae6ecbc208c29c291829d367d6621b05dfa
eriktorbjorn
eriktorbjorn at telia.com
Fri Apr 26 23:40:11 CEST 2013
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:
50c8fae6ec TINSEL: Reorder loop condition to fix out-of-bounds access
Commit: 50c8fae6ecbc208c29c291829d367d6621b05dfa
https://github.com/scummvm/scummvm/commit/50c8fae6ecbc208c29c291829d367d6621b05dfa
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-04-26T14:38:20-07:00
Commit Message:
TINSEL: Reorder loop condition to fix out-of-bounds access
This should fix CID 1003943 and CID 1003944.
Changed paths:
engines/tinsel/dialogs.cpp
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index d0c99f7..e6229ff 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -3655,10 +3655,10 @@ extern void HideConversation(bool bHide) {
if (g_InventoryState == ACTIVE_INV && g_ino == INV_CONV) {
if (bHide) {
// Move all the window and icons off-screen
- for (i = 0; g_objArray[i] && i < MAX_WCOMP; i++) {
+ for (i = 0; i < MAX_WCOMP && g_objArray[i]; i++) {
MultiAdjustXY(g_objArray[i], 2 * SCREEN_WIDTH, 0);
}
- for (i = 0; g_iconArray[i] && i < MAX_ICONS; i++) {
+ for (i = 0; i < MAX_ICONS && g_iconArray[i]; i++) {
MultiAdjustXY(g_iconArray[i], 2 * SCREEN_WIDTH, 0);
}
More information about the Scummvm-git-logs
mailing list