Skip to content

Commit

Permalink
TITANIC: Fix locating vocab words in getPrimeWord
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jan 16, 2017
1 parent aef95a6 commit 66453da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engines/titanic/true_talk/tt_vocab.cpp
Expand Up @@ -202,18 +202,20 @@ TTword *TTvocab::getPrimeWord(TTstring &str, TTword **srcWord) const {
newWord = new TTword(str, WC_ABSTRACT, 300);
} else {
// Standard word
for (vocabP = _headP; vocabP && !newWord; vocabP = vocabP->_nextP) {
for (vocabP = _headP; vocabP; vocabP = vocabP->_nextP) {
if (_vocabMode == 3 && !strcmp(str.c_str(), vocabP->c_str())) {
newWord = vocabP->copy();
newWord->_nextP = nullptr;
newWord->setSyn(nullptr);
break;
} else if (vocabP->findSynByName(str, &tempSyn, _vocabMode)) {
// Create a copy of the word and the found synonym
TTsynonym *newSyn = new TTsynonym(tempSyn);
newSyn->_nextP = newSyn->_priorP = nullptr;
newWord = vocabP->copy();
newWord->_nextP = nullptr;
newWord->setSyn(newSyn);
break;
}
}
}
Expand Down

0 comments on commit 66453da

Please sign in to comment.