diff options
author | Paul Gilbert | 2016-09-22 20:47:26 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-22 20:47:26 -0400 |
commit | 5b7f005ba20e05b666c8ccb14874ed8d3a35dc98 (patch) | |
tree | 2a1ab602d530edd7eb45f3cf7a804d81028134fb /engines/xeen | |
parent | 8a3bcd4c6075197d219324b27f4f721de27b6a5c (diff) | |
download | scummvm-rg350-5b7f005ba20e05b666c8ccb14874ed8d3a35dc98.tar.gz scummvm-rg350-5b7f005ba20e05b666c8ccb14874ed8d3a35dc98.tar.bz2 scummvm-rg350-5b7f005ba20e05b666c8ccb14874ed8d3a35dc98.zip |
XEEN: Fix subscript warnings in ItemsDialog
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/dialogs_items.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/xeen/dialogs_items.cpp b/engines/xeen/dialogs_items.cpp index be0c2dab1c..56de6a5b17 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; |