From 89c1f2cfefd5017a92727337a31d339651275d3e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Dec 2019 14:44:26 +0100 Subject: DIRECTOR: LINGO: Fix define() code, we were adding too many instructions --- engines/director/lingo/lingo-codegen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') 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, ""); } return sym; -- cgit v1.2.3