aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2014-05-02 04:14:19 +0300
committerFilippos Karapetis2014-05-02 04:22:21 +0300
commitd888938d9b6d2e393eeac3a1b2551ccc8d36f49e (patch)
treea5ce9bdd397253f4bc2d0d44697f5308f82aa168
parent8c58a046dbae7c07b06b21c4b42d3b5206841569 (diff)
downloadscummvm-rg350-d888938d9b6d2e393eeac3a1b2551ccc8d36f49e.tar.gz
scummvm-rg350-d888938d9b6d2e393eeac3a1b2551ccc8d36f49e.tar.bz2
scummvm-rg350-d888938d9b6d2e393eeac3a1b2551ccc8d36f49e.zip
MADS: Add a sanity check in MADSAction::set()
-rw-r--r--engines/mads/action.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp
index cfd84bf762..f1e27d7482 100644
--- a/engines/mads/action.cpp
+++ b/engines/mads/action.cpp
@@ -226,7 +226,7 @@ void MADSAction::set() {
_statusText += kArticleList[articleNum];
}
} else if ((_articleNumber == VERB_LOOK) || (_vm->getGameID() != GType_RexNebular) ||
- (scene._vocabStrings[_action._indirectObjectId] != kFenceStr)) {
+ (_action._indirectObjectId >= 0 && scene._vocabStrings[_action._indirectObjectId] != kFenceStr)) {
// Write out the article
_statusText += kArticleList[_articleNumber];
} else {