aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-11 15:50:21 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-11 16:00:44 +1100
commit15e5dbb494dcb013031723eee6d8b0dcd8093d2a (patch)
treef5eca6dbde5dcba852ad4ded3bea2bf62e8ad433 /src
parentd99cc3be545aa7f827030ec0ac502c00f530f8bf (diff)
downloadfengari-15e5dbb494dcb013031723eee6d8b0dcd8093d2a.tar.gz
fengari-15e5dbb494dcb013031723eee6d8b0dcd8093d2a.tar.bz2
fengari-15e5dbb494dcb013031723eee6d8b0dcd8093d2a.zip
src/loadlib.js: Fix incorrect type of LUA_IGMARK
Diffstat (limited to 'src')
-rw-r--r--src/loadlib.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/loadlib.js b/src/loadlib.js
index cae377f..a64f1c3 100644
--- a/src/loadlib.js
+++ b/src/loadlib.js
@@ -4,12 +4,12 @@ const fengari = require('./fengari.js');
const lua = require('./lua.js');
const lauxlib = require('./lauxlib.js');
-const LUA_IGMARK = ["-".charCodeAt(0)];
-
const CLIBS = lua.to_luastring("__CLIBS__", true);
const LUA_PATH_VAR = "LUA_PATH";
const LUA_CPATH_VAR = "LUA_CPATH";
+const LUA_IGMARK = "-";
+
/*
** LUA_CSUBSEP is the character that replaces dots in submodule names
** when searching for a C loader.
@@ -323,7 +323,7 @@ const searcher_Lua = function(L) {
const loadfunc = function(L, filename, modname) {
let openfunc;
modname = lauxlib.luaL_gsub(L, modname, [".".charCodeAt(0)], LUA_OFSEP);
- let mark = modname.indexOf(LUA_IGMARK[0]);
+ let mark = modname.indexOf(LUA_IGMARK.charCodeAt(0));
if (mark >= 0) {
openfunc = lua.lua_pushlstring(L, modname, mark);
openfunc = lua.lua_pushfstring(L, lua.to_luastring("%s%s"), LUA_POF, openfunc);