TITANIC: Fix crash in TTparser::processModifiers

This commit is contained in:
Paul Gilbert 2016-11-06 14:36:45 -05:00
parent 927adb7f05
commit e6c15b8f4d

View File

@ -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 += ' ';