aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/script.cpp6
-rw-r--r--scumm/string.cpp9
2 files changed, 15 insertions, 0 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp
index 7b7d4098ec..04815b48c0 100644
--- a/scumm/script.cpp
+++ b/scumm/script.cpp
@@ -1059,6 +1059,12 @@ int ScummEngine::resStrLen(const byte *src) const {
chr = *src++;
num++;
+ // WORKAROUND for bug #985948, a script bug in Indy3. See also
+ // the corresponding code in ScummEngine::addMessageToStack().
+ if (_gameId == GID_INDY3 && chr == 0x2E) {
+ continue;
+ }
+
if (chr != 1 && chr != 2 && chr != 3 && chr != 8) {
if (_version == 8) {
src += 4;
diff --git a/scumm/string.cpp b/scumm/string.cpp
index c2166f8421..eb51bfeead 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -468,6 +468,15 @@ int ScummEngine::addMessageToStack(const byte *msg, byte *dst, int dstSize) {
break;
if (chr == 0xFF) {
chr = src[num++];
+
+ // WORKAROUND for bug #985948, a script bug in Indy3. Apparently,
+ // a german 'sz' was encoded incorrectly as 0xFF2E. We replace
+ // this by the correct encoding here. See also ScummEngine::resStrLen().
+ if (_gameId == GID_INDY3 && chr == 0x2E) {
+ *dst++ = 0xE1;
+ continue;
+ }
+
if (chr == 1 || chr == 2 || chr == 3 || chr == 8) {
// Simply copy these special codes
*dst++ = 0xFF;