aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorEugene Sandulenko2019-06-20 12:58:21 +0200
committerEugene Sandulenko2019-09-03 17:16:51 +0200
commite7c72d05808bc8276797e6b580592ab8c2ae00c9 (patch)
tree18fd9e1ac3af2d15a59844cd04fc9f4a8d05a114 /engines/hdb
parent641c2a91796a4fbfecc80652b3dbfb0a597f02eb (diff)
downloadscummvm-rg350-e7c72d05808bc8276797e6b580592ab8c2ae00c9.tar.gz
scummvm-rg350-e7c72d05808bc8276797e6b580592ab8c2ae00c9.tar.bz2
scummvm-rg350-e7c72d05808bc8276797e6b580592ab8c2ae00c9.zip
HDB: Fixed nu,ber of parameters when calling Lua functions
Diffstat (limited to 'engines/hdb')
-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 08d5f77fa6..fc10a9de54 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -811,14 +811,13 @@ bool LuaScript::initScript(Common::SeekableReadStream *stream, const char *scrip
}
bool LuaScript::callFunction(const char *name, int returns) {
-
if (!_systemInit) {
return false;
}
lua_getglobal(_state, name);
- if (lua_pcall(_state, 0, 0, -2)) {
+ if (lua_pcall(_state, 0, returns, -2)) {
error("An error occured while executing \"%s\": %s.", name, lua_tostring(_state, -1));
lua_pop(_state, -1);