[Scummvm-git-logs] scummvm master -> 4c30db399be165fabc8a2b4414cf66c7d1ff5784
dreammaster
noreply at scummvm.org
Fri Nov 8 05:51:25 UTC 2024
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:
4c30db399b TITANIC: Fix crash when using 'that' as a sentence
Commit: 4c30db399be165fabc8a2b4414cf66c7d1ff5784
https://github.com/scummvm/scummvm/commit/4c30db399be165fabc8a2b4414cf66c7d1ff5784
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-11-07T21:50:34-08:00
Commit Message:
TITANIC: Fix crash when using 'that' as a sentence
Fixes bug #15162
Changed paths:
engines/titanic/true_talk/tt_parser.cpp
diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp
index b81493cccb0..4bd6300b473 100644
--- a/engines/titanic/true_talk/tt_parser.cpp
+++ b/engines/titanic/true_talk/tt_parser.cpp
@@ -928,6 +928,7 @@ int TTparser::considerRequests(TTword *word) {
case SEEK_OWNERSHIP:
if (word->_id == 601) {
if (TTconcept::findByWordClass(_conceptP, WC_THING))
+ assert(_conceptP);
status = _conceptP->setOwner(word, false);
flag = true;
@@ -1208,6 +1209,7 @@ int TTparser::considerRequests(TTword *word) {
break;
case MKTAG('F', 'A', 'R', 'R'):
+ assert(_conceptP);
if (_conceptP->findBy20(0))
_conceptP->_field20 = 2;
break;
@@ -1251,6 +1253,7 @@ int TTparser::considerRequests(TTword *word) {
break;
case MKTAG('N', 'E', 'A', 'R'):
+ assert(_conceptP);
if (_conceptP->findBy20(0)) {
_conceptP->_field20 = 1;
} else {
@@ -1392,7 +1395,7 @@ void TTparser::removeConcept(TTconcept *c) {
return;
if (_conceptP == c) {
- // Concept specified is the ver ystart of the linked list, so reset head pointer
+ // Concept specified is the very start of the linked list, so reset head pointer
_conceptP = _conceptP->_nextP;
} else {
// Scan through the linked list, looking for the specific concept
@@ -1423,7 +1426,7 @@ int TTparser::checkForAction() {
bool flag = false;
bool actionFlag = false;
- if (_conceptP && _currentWordP) {
+ if (_currentWordP && !_conceptP) {
// Firstly we need to get the next word to process, and remove it from
// the list pointed to by _currentWordP
TTword *word = _currentWordP;
More information about the Scummvm-git-logs
mailing list