aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/true_talk/tt_vocab.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/titanic/true_talk/tt_vocab.cpp b/engines/titanic/true_talk/tt_vocab.cpp
index 6748d6535b..b37d30e65e 100644
--- a/engines/titanic/true_talk/tt_vocab.cpp
+++ b/engines/titanic/true_talk/tt_vocab.cpp
@@ -202,11 +202,12 @@ 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);
@@ -214,6 +215,7 @@ TTword *TTvocab::getPrimeWord(TTstring &str, TTword **srcWord) const {
newWord = vocabP->copy();
newWord->_nextP = nullptr;
newWord->setSyn(newSyn);
+ break;
}
}
}