[Scummvm-git-logs] scummvm master -> 5bb9174ad7a594a1884d3c5646146153c91ffdbb
sluicebox
22204938+sluicebox at users.noreply.github.com
Sun Jun 16 11:59:14 CEST 2019
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:
5bb9174ad7 SCI: Fix regression in message workarounds
Commit: 5bb9174ad7a594a1884d3c5646146153c91ffdbb
https://github.com/scummvm/scummvm/commit/5bb9174ad7a594a1884d3c5646146153c91ffdbb
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-06-16T02:57:34-07:00
Commit Message:
SCI: Fix regression in message workarounds
Reverts an unintended change to the message recursion loop introduced in
56ea963cea3cdf04c44d3d6f545df664f4a27e8d that breaks the message stack
Changed paths:
engines/sci/engine/message.cpp
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index 0688b1a..dbb9362 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -245,7 +245,7 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re
} else if (workaround.type == MSG_WORKAROUND_FAKE) {
// return a fake message record hard-coded in the workaround.
// this leaves the stack unchanged.
- record.tuple = stack.top();
+ record.tuple = tuple;
record.refTuple = MessageTuple();
record.string = workaround.text;
record.length = strlen(workaround.text);
@@ -262,7 +262,7 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re
if (reader->findRecord(textTuple, textRecord)) {
uint32 textLength = (workaround.substringLength == 0) ? textRecord.length : workaround.substringLength;
if (workaround.substringIndex + textLength <= textRecord.length) {
- record.tuple = stack.top();
+ record.tuple = tuple;
record.refTuple = MessageTuple();
record.string = textRecord.string + workaround.substringIndex;
record.length = textLength;
@@ -274,9 +274,9 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re
}
while (1) {
- tuple = stack.top();
+ MessageTuple &t = stack.top();
- if (!reader->findRecord(tuple, record)) {
+ if (!reader->findRecord(t, record)) {
// Tuple not found
if (recurse && (stack.size() > 1)) {
stack.pop();
@@ -291,7 +291,7 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re
MessageTuple &ref = record.refTuple;
if (ref.noun || ref.verb || ref.cond) {
- tuple.seq++;
+ t.seq++;
stack.push(ref);
continue;
}
More information about the Scummvm-git-logs
mailing list