From fd0e17057364c468fb53b1a23478eeb25a95e525 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 12 May 2017 12:57:37 +1000 Subject: src/ldebug.js: Fix index used for error message --- src/loadlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loadlib.js b/src/loadlib.js index df675dd..c70e7f9 100644 --- a/src/loadlib.js +++ b/src/loadlib.js @@ -254,7 +254,7 @@ const checkload = function(L, stat, filename) { return 2; /* return open function and file name */ } else return lauxlib.luaL_error(L, lua.to_luastring("error loading module '%s' from file '%s':\n\t%s"), - lua.lua_tostring(L, 1), filename, lua.lua_tostring(L, 1)); + lua.lua_tostring(L, 1), filename, lua.lua_tostring(L, -1)); }; const searcher_Lua = function(L) { -- cgit v1.2.3-70-g09d2