From e6c15b8f4d3d02c8b071ca389f5e0a0c4fbc17db Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 6 Nov 2016 14:36:45 -0500 Subject: TITANIC: Fix crash in TTparser::processModifiers --- engines/titanic/true_talk/tt_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic') diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp index 23a5a91ad4..28160a07ea 100644 --- a/engines/titanic/true_talk/tt_parser.cpp +++ b/engines/titanic/true_talk/tt_parser.cpp @@ -1634,7 +1634,7 @@ int TTparser::processModifiers(int modifier, TTword *word) { TTconcept *newConcept = new TTconcept(word, ST_UNKNOWN_SCRIPT); // Cycles through each word - for (TTword *currP = _currentWordP; currP != word; currP = _currentWordP) { + for (TTword *currP = _currentWordP; currP && currP != word; currP = _currentWordP) { if ((modifier == 2 && currP->_wordClass == WC_ADJECTIVE) || (modifier == 1 && currP->_wordClass == WC_ADVERB)) { newConcept->_string2 += ' '; -- cgit v1.2.3