aboutsummaryrefslogtreecommitdiff
path: root/engines/lilliput/script.cpp
diff options
context:
space:
mode:
authorStrangerke2012-04-27 23:17:40 +0200
committerEugene Sandulenko2018-03-28 17:36:57 +0200
commit794869656b2d0433b69ae6627844288c1e7288d4 (patch)
tree62423ddaf52472447227150030ab50005ff04ea6 /engines/lilliput/script.cpp
parent977c07ba70e8d3ebdd86b3ddf30903762e5d7ce0 (diff)
downloadscummvm-rg350-794869656b2d0433b69ae6627844288c1e7288d4.tar.gz
scummvm-rg350-794869656b2d0433b69ae6627844288c1e7288d4.tar.bz2
scummvm-rg350-794869656b2d0433b69ae6627844288c1e7288d4.zip
LILLIPUT: Fix a bug in OC_for
Diffstat (limited to 'engines/lilliput/script.cpp')
-rw-r--r--engines/lilliput/script.cpp7
1 files changed, 4 insertions, 3 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;
}