[Scummvm-git-logs] scummvm master -> 5b7f005ba20e05b666c8ccb14874ed8d3a35dc98

dreammaster dreammaster at scummvm.org
Fri Sep 23 02:47:31 CEST 2016


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:
5b7f005ba2 XEEN: Fix subscript warnings in ItemsDialog


Commit: 5b7f005ba20e05b666c8ccb14874ed8d3a35dc98
    https://github.com/scummvm/scummvm/commit/5b7f005ba20e05b666c8ccb14874ed8d3a35dc98
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-22T20:47:26-04:00

Commit Message:
XEEN: Fix subscript warnings in ItemsDialog

Changed paths:
    engines/xeen/dialogs_items.cpp



diff --git a/engines/xeen/dialogs_items.cpp b/engines/xeen/dialogs_items.cpp
index be0c2da..56de6a5 100644
--- a/engines/xeen/dialogs_items.cpp
+++ b/engines/xeen/dialogs_items.cpp
@@ -581,7 +581,7 @@ void ItemsDialog::blackData2CharData() {
 	Party &party = *_vm->_party;
 	bool isDarkCc = _vm->_files->_isDarkCc;
 	int slotIndex = 0;
-	while (party._mazeId != (int)Res.BLACKSMITH_MAP_IDS[isDarkCc][slotIndex] && slotIndex < 4)
+	while (slotIndex < 4 && party._mazeId != (int)Res.BLACKSMITH_MAP_IDS[isDarkCc][slotIndex])
 		++slotIndex;
 	if (slotIndex == 4)
 		slotIndex = 0;
@@ -598,7 +598,7 @@ void ItemsDialog::charData2BlackData() {
 	Party &party = *_vm->_party;
 	bool isDarkCc = _vm->_files->_isDarkCc;
 	int slotIndex = 0;
-	while (party._mazeId != (int)Res.BLACKSMITH_MAP_IDS[isDarkCc][slotIndex] && slotIndex < 4)
+	while (slotIndex < 4 && party._mazeId != (int)Res.BLACKSMITH_MAP_IDS[isDarkCc][slotIndex])
 		++slotIndex;
 	if (slotIndex == 4)
 		slotIndex = 0;





More information about the Scummvm-git-logs mailing list