From 43bdbdf3facc81fb8fe6019a9d2dca0427f00ad1 Mon Sep 17 00:00:00 2001 From: BLooperZ Date: Mon, 19 Aug 2019 20:02:44 +0300 Subject: SCUMM: fix missing dialogue in indy4 --- engines/scumm/string.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index c418186004..a56b291bff 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -1029,7 +1029,7 @@ void ScummEngine::drawString(int a, const byte *msg) { if (_game.id == GID_INDY4 && ltext[0] == 127) { buf[start + pos + ll] = 127; - buf[start + pos+ll + 1] = '\0'; + buf[start + pos + ll + 1] = '\0'; } } @@ -1095,10 +1095,12 @@ void ScummEngine::drawString(int a, const byte *msg) { _charset->_left -= _charset->getStringWidth(a, buf) / 2; } else if (_game.version >= 4 && _game.version < 7 && _game.id != GID_SAMNMAX && (_language == Common::HE_ISR || true)) { if (_game.id != GID_INDY4 || buf[0] == 127) { + int ll = 0; if (_game.id == GID_INDY4 && buf[0] == 127) { buf[0] = 32; + ll++; } - int ll = 0; + byte* ltext = buf; while (ltext[ll] == 0xFF) { ll += 4; -- cgit v1.2.3