From d888938d9b6d2e393eeac3a1b2551ccc8d36f49e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 2 May 2014 04:14:19 +0300 Subject: MADS: Add a sanity check in MADSAction::set() --- engines/mads/action.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3