aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-07-06 16:33:45 -0400
committerPaul Gilbert2017-07-06 16:33:45 -0400
commit11bb59a08f52a242dc39e36959a2ebfa48cb2a0b (patch)
treeefd0c445127f58c38a9b10410a1c476c4ab0cc5a
parente04815f932f38b16187052c62a52cd86b4091fb6 (diff)
downloadscummvm-rg350-11bb59a08f52a242dc39e36959a2ebfa48cb2a0b.tar.gz
scummvm-rg350-11bb59a08f52a242dc39e36959a2ebfa48cb2a0b.tar.bz2
scummvm-rg350-11bb59a08f52a242dc39e36959a2ebfa48cb2a0b.zip
TITANIC: Fix NPC conversation crash
-rw-r--r--engines/titanic/true_talk/tt_word.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/titanic/true_talk/tt_word.cpp b/engines/titanic/true_talk/tt_word.cpp
index 01541de7dc..5ed3e5755f 100644
--- a/engines/titanic/true_talk/tt_word.cpp
+++ b/engines/titanic/true_talk/tt_word.cpp
@@ -217,8 +217,9 @@ TTstringStatus TTword::getChainStatus() const {
}
TTword *TTword::copyWords() {
+ // Replicate the word and all following words it's linked to
TTword *result = copy();
- for (TTword *word = result; word; word = word->_nextP)
+ for (TTword *word = result; word->_nextP; word = word->_nextP)
word->_nextP = word->_nextP->copy();
return result;