aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-12 12:57:37 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-12 12:57:37 +1000
commitfd0e17057364c468fb53b1a23478eeb25a95e525 (patch)
treed6611b4677a5ff496e22bddf188613a0eccef032
parent60d914eec7c350caa31efb511214f3dc6b497c26 (diff)
downloadfengari-fd0e17057364c468fb53b1a23478eeb25a95e525.tar.gz
fengari-fd0e17057364c468fb53b1a23478eeb25a95e525.tar.bz2
fengari-fd0e17057364c468fb53b1a23478eeb25a95e525.zip
src/ldebug.js: Fix index used for error message
-rw-r--r--src/loadlib.js2
1 files changed, 1 insertions, 1 deletions
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) {