summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);