aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/lua-script.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-13 23:18:30 +0200
committerEugene Sandulenko2019-09-03 17:17:20 +0200
commit2c40e1ae365578a1b6913dd72460fb8dba55090d (patch)
tree756ed591fe339e44761b69c96995045a935337d8 /engines/hdb/lua-script.cpp
parenta745d45f380d9cd6a042171b8cb2ceabe1b62ce5 (diff)
downloadscummvm-rg350-2c40e1ae365578a1b6913dd72460fb8dba55090d.tar.gz
scummvm-rg350-2c40e1ae365578a1b6913dd72460fb8dba55090d.tar.bz2
scummvm-rg350-2c40e1ae365578a1b6913dd72460fb8dba55090d.zip
HDB: Fix loading Lua scripts
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r--engines/hdb/lua-script.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index 3e55ed54d5..8302fca579 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -1706,9 +1706,8 @@ void debugHook(lua_State *L, lua_Debug *ar) {
}
bool LuaScript::initScript(Common::SeekableReadStream *stream, const char *scriptName, int32 length) {
-
if (_systemInit) {
- return false;
+ lua_close(_state);
}
// Initialize Lua Environment