aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk/tt_sentence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/true_talk/tt_sentence.cpp')
-rw-r--r--engines/titanic/true_talk/tt_sentence.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/titanic/true_talk/tt_sentence.cpp b/engines/titanic/true_talk/tt_sentence.cpp
index 9588ee021e..f187710de7 100644
--- a/engines/titanic/true_talk/tt_sentence.cpp
+++ b/engines/titanic/true_talk/tt_sentence.cpp
@@ -83,7 +83,7 @@ void TTsentence::copyFrom(const TTsentence &src) {
if (src._nodesP) {
// Source has processed nodes, so duplicate them
for (TTsentenceNode *node = src._nodesP; node;
- node = static_cast<TTsentenceNode *>(node->_nextP)) {
+ node = dynamic_cast<TTsentenceNode *>(node->_nextP)) {
TTsentenceNode *newNode = new TTsentenceNode(node->_wordP);
if (_nodesP)
_nodesP->addToTail(newNode);
@@ -319,7 +319,7 @@ bool TTsentence::localWord(const char *str) const {
bool result = false;
for (TTsentenceNode *nodeP = _nodesP; nodeP && !result;
- nodeP = static_cast<TTsentenceNode *>(nodeP->_nextP)) {
+ nodeP = dynamic_cast<TTsentenceNode *>(nodeP->_nextP)) {
TTsynonym syn;
if (!nodeP->_wordP)
continue;