aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/lua-script.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-21 21:12:18 +0200
committerEugene Sandulenko2019-09-03 17:17:26 +0200
commitd61d93ebe183c29cdc8153df7dc9109ee71dc347 (patch)
treeb0598f59d021d12b3eb8af0968ec74b794a347c6 /engines/hdb/lua-script.cpp
parent599e144453af1aafc35e06973983345f05da8ae5 (diff)
downloadscummvm-rg350-d61d93ebe183c29cdc8153df7dc9109ee71dc347.tar.gz
scummvm-rg350-d61d93ebe183c29cdc8153df7dc9109ee71dc347.tar.bz2
scummvm-rg350-d61d93ebe183c29cdc8153df7dc9109ee71dc347.zip
HDB: Fix loading of Lua script from the save
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r--engines/hdb/lua-script.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index cf0ef69f8a..1776ab7d72 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -1388,7 +1388,7 @@ static int dofile(lua_State *L) {
Common::InSaveFile *in = g_hdb->_currentInSaveFile;
- int length = in->size();
+ int length = in->size() - in->pos();
char *chunk = new char[length + 1];
in->read((void *)chunk, length);