diff options
author | Eugene Sandulenko | 2016-07-15 19:31:18 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 2e0078ef0640dc237b0681e03f06824bffd9be10 (patch) | |
tree | 328b9c6db9be650a452ec0a0d1027fefb73b8da3 /engines/director/lingo/lingo.cpp | |
parent | 78b198cee9920e62ea19879959316b426fe1834c (diff) | |
download | scummvm-rg350-2e0078ef0640dc237b0681e03f06824bffd9be10.tar.gz scummvm-rg350-2e0078ef0640dc237b0681e03f06824bffd9be10.tar.bz2 scummvm-rg350-2e0078ef0640dc237b0681e03f06824bffd9be10.zip |
DIRECTOR: Lingo: Fix line counting in code chunks
Diffstat (limited to 'engines/director/lingo/lingo.cpp')
-rw-r--r-- | engines/director/lingo/lingo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 8302c5996e..2c2583699e 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -163,7 +163,7 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) { begin = code; first = false; } - Common::String chunk(begin, end - 1); + Common::String chunk(begin, end); if (chunk.hasPrefix("factory") || chunk.hasPrefix("method")) _inFactory = true; @@ -182,6 +182,8 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) { } _hadError = true; // HACK: This is for preventing test execution + + debug(2, "Code chunk:\n#####\n%s#####", begin); parse(begin); } else { parse(code); |