aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-01 14:44:26 +0100
committerEugene Sandulenko2019-12-01 16:29:54 +0100
commit89c1f2cfefd5017a92727337a31d339651275d3e (patch)
tree993d243acd2990b2d87afc6d34d94d150aa72630 /engines
parentf26bb57ef85368ae392fef129cf96b723a1e1b3d (diff)
downloadscummvm-rg350-89c1f2cfefd5017a92727337a31d339651275d3e.tar.gz
scummvm-rg350-89c1f2cfefd5017a92727337a31d339651275d3e.tar.bz2
scummvm-rg350-89c1f2cfefd5017a92727337a31d339651275d3e.zip
DIRECTOR: LINGO: Fix define() code, we were adding too many instructions
Diffstat (limited to 'engines')
-rw-r--r--engines/director/lingo/lingo-codegen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index 0b974771c9..e08844eac0 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -240,7 +240,7 @@ Symbol *Lingo::define(Common::String &name, int start, int nargs, Common::String
if (end == -1)
end = _currentScript->size();
- sym->u.defn = new ScriptData(&(*_currentScript)[start], end - start + 1);
+ sym->u.defn = new ScriptData(&(*_currentScript)[start], end - start);
sym->nargs = nargs;
sym->maxArgs = nargs;
@@ -256,6 +256,7 @@ Symbol *Lingo::define(Common::String &name, int start, int nargs, Common::String
Common::String instr = g_lingo->decodeInstruction(sym->u.defn, pc, &pc);
debugC(1, kDebugLingoExec, "[%5d] %s", pc, instr.c_str());
}
+ debugC(1, kDebugLingoExec, "<end define code>");
}
return sym;