diff --git a/aegisub/src/auto4_lua_scriptreader.cpp b/aegisub/src/auto4_lua_scriptreader.cpp index a588cd7ea..a5e92074a 100644 --- a/aegisub/src/auto4_lua_scriptreader.cpp +++ b/aegisub/src/auto4_lua_scriptreader.cpp @@ -57,6 +57,7 @@ namespace Automation4 { if (luaL_dostring(L, "return require('moonscript').loadstring")) return false; // Leaves error message on stack lua_pushlstring(L, &buff[0], buff.size()); - return lua_pcall(L, 1, 1, 0) == 0; // Leaves script or error message on stack + lua_pushstring(L, filename.string().c_str()); + return lua_pcall(L, 2, 1, 0) == 0; // Leaves script or error message on stack } }