aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/lua-script.cpp8
-rw-r--r--engines/hdb/lua-script.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index e4d5f0efe7..7da2bd9bd8 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -1576,7 +1576,7 @@ bool LuaScript::executeMPC(Common::SeekableReadStream *stream, const char *name,
addPatches(chunkString, scriptName);
- if (!executeChunk(chunkString, chunkString.size(), name)) {
+ if (!executeChunk(chunkString, name)) {
delete[] chunk;
return false;
@@ -1610,7 +1610,7 @@ bool LuaScript::executeFile(const Common::String &filename) {
addPatches(fileDataString, filename.c_str());
- if (!executeChunk(fileDataString, fileDataString.size(), filename)) {
+ if (!executeChunk(fileDataString, filename)) {
delete[] fileData;
delete file;
@@ -1623,14 +1623,14 @@ bool LuaScript::executeFile(const Common::String &filename) {
return true;
}
-bool LuaScript::executeChunk(Common::String &chunk, uint chunkSize, const Common::String &chunkName) const {
+bool LuaScript::executeChunk(Common::String &chunk, const Common::String &chunkName) const {
if (!_systemInit) {
return false;
}
// Compile Chunk
- if (luaL_loadbuffer(_state, chunk.c_str(), chunkSize, chunkName.c_str())) {
+ if (luaL_loadbuffer(_state, chunk.c_str(), chunk.size(), chunkName.c_str())) {
error("Couldn't compile \"%s\": %s", chunkName.c_str(), lua_tostring(_state, -1));
lua_pop(_state, -1);
diff --git a/engines/hdb/lua-script.h b/engines/hdb/lua-script.h
index 6949debc44..92574d268e 100644
--- a/engines/hdb/lua-script.h
+++ b/engines/hdb/lua-script.h
@@ -71,7 +71,7 @@ private:
bool _systemInit;
bool registerExtensions();
- bool executeChunk(Common::String &chunk, uint chunkSize, const Common::String &chunkName) const;
+ bool executeChunk(Common::String &chunk, const Common::String &chunkName) const;
void stripComments(char *chunk);
void addPatches(Common::String &chunk, const char *scriptName);
};