[Scummvm-git-logs] scummvm master -> 66453dac06e9a3a815d2cf755fab610ed2c72071

dreammaster dreammaster at scummvm.org
Mon Jan 16 23:29:24 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
66453dac06 TITANIC: Fix locating vocab words in getPrimeWord


Commit: 66453dac06e9a3a815d2cf755fab610ed2c72071
    https://github.com/scummvm/scummvm/commit/66453dac06e9a3a815d2cf755fab610ed2c72071
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-16T17:29:17-05:00

Commit Message:
TITANIC: Fix locating vocab words in getPrimeWord

Changed paths:
    engines/titanic/true_talk/tt_vocab.cpp


diff --git a/engines/titanic/true_talk/tt_vocab.cpp b/engines/titanic/true_talk/tt_vocab.cpp
index 6748d65..b37d30e 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;
 			}
 		}
 	}





More information about the Scummvm-git-logs mailing list