diff options
author | athrxx | 2011-12-27 21:50:07 +0100 |
---|---|---|
committer | athrxx | 2011-12-28 00:01:29 +0100 |
commit | a35550d200a9e19894571758afe992185c6c6176 (patch) | |
tree | 7aa18a17a5f850e6764def6482a86620c6bccbbc /engines/kyra/eobcommon.cpp | |
parent | e6b6099d54c05a95530125e95da69a90aff4863d (diff) | |
download | scummvm-rg350-a35550d200a9e19894571758afe992185c6c6176.tar.gz scummvm-rg350-a35550d200a9e19894571758afe992185c6c6176.tar.bz2 scummvm-rg350-a35550d200a9e19894571758afe992185c6c6176.zip |
KYRA: (EOB) - fix invalid string access in EOB 1
(when entering the memorize/pray menu without having a mage/cleric)
Diffstat (limited to 'engines/kyra/eobcommon.cpp')
-rw-r--r-- | engines/kyra/eobcommon.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp index bc01fead6b..304d1a4539 100644 --- a/engines/kyra/eobcommon.cpp +++ b/engines/kyra/eobcommon.cpp @@ -1059,6 +1059,9 @@ int EoBCoreEngine::countCharactersWithSpecificItems(int16 itemType, int16 itemVa } int EoBCoreEngine::checkInventoryForItem(int character, int16 itemType, int16 itemValue) { + if (character < 0 ) + return -1; + for (int i = 0; i < 27; i++) { uint16 inv = _characters[character].inventory[i]; if (!inv) |