diff options
author | Strangerke | 2012-04-27 23:17:40 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | 794869656b2d0433b69ae6627844288c1e7288d4 (patch) | |
tree | 62423ddaf52472447227150030ab50005ff04ea6 | |
parent | 977c07ba70e8d3ebdd86b3ddf30903762e5d7ce0 (diff) | |
download | scummvm-rg350-794869656b2d0433b69ae6627844288c1e7288d4.tar.gz scummvm-rg350-794869656b2d0433b69ae6627844288c1e7288d4.tar.bz2 scummvm-rg350-794869656b2d0433b69ae6627844288c1e7288d4.zip |
LILLIPUT: Fix a bug in OC_for
-rw-r--r-- | engines/lilliput/script.cpp | 7 | ||||
-rw-r--r-- | engines/lilliput/script.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index bd67783f1b..df21358f86 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -99,7 +99,7 @@ byte LilliputScript::handleOpcodeType1(int curWord) { return OC_getRandom(); break; case 0x6: - return OC_sub1748C(); + return OC_for(); break; case 0x7: return OC_compWord18776(); @@ -960,8 +960,8 @@ byte LilliputScript::OC_getRandom() { return 0; } -byte LilliputScript::OC_sub1748C() { - debugC(1, kDebugScript, "OC_sub1748C()"); +byte LilliputScript::OC_for() { + debugC(1, kDebugScript, "OC_for()"); int var1 = _currScript->readUint16LE(); int tmpVal = _currScript->readUint16LE() + 1; @@ -971,6 +971,7 @@ byte LilliputScript::OC_sub1748C() { if (tmpVal < var1) return 0; + _currScript->writeUint16LE(0, -2); return 1; } diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index 0b218d628d..24a74d7c24 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -122,7 +122,7 @@ private: byte OC_sub17434(); byte OC_sub17468(); byte OC_getRandom(); - byte OC_sub1748C(); + byte OC_for(); byte OC_compWord18776(); byte OC_checkSaveFlag(); byte OC_sub174C8(); |