diff options
-rw-r--r-- | engines/avalanche/avalot.cpp | 6 | ||||
-rw-r--r-- | engines/avalanche/dialogs.cpp | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 072ad00ed6..11729ea779 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -1564,10 +1564,12 @@ Common::String AvalancheEngine::getName(People whose) { static const char lasses[4][15] = {"Arkata", "Geida", "\0xB1", "the Wise Woman"}; - if (whose < kPeopleArkata) + if (whose <= kPeopleJacques) return Common::String(lads[whose - kPeopleAvalot]); - else + else if ((whose >= kPeopleArkata) && (whose <= kPeopleWisewoman)) return Common::String(lasses[whose - kPeopleArkata]); + else + error("getName() - Unexpected character id %d", (byte) whose); } Common::String AvalancheEngine::getItem(byte which) { diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp index e121141a2a..8770e08d60 100644 --- a/engines/avalanche/dialogs.cpp +++ b/engines/avalanche/dialogs.cpp @@ -1164,7 +1164,9 @@ void Dialogs::sayThanks(byte thing) { Common::String tmpStr = personSpeaks(); tmpStr += Common::String::format("Hey, thanks!%c(But now, you've lost it!)", kControlSpeechBubble); displayText(tmpStr); - _vm->_objects[thing] = false; + + if (thing < kObjectNum) + _vm->_objects[thing] = false; } /** |