diff options
author | daurnimator <quae@daurnimator.com> | 2017-08-17 15:38:15 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-08-17 15:38:15 +1000 |
commit | d1214681a314f6ee50c2f02740f59bb9ce6902a3 (patch) | |
tree | 336117081772a600a598357e4af895b6d9298665 /src/loadlib.js | |
parent | 0186ad3e5be4cbf7738a4cc2f5bb7679f16e5800 (diff) | |
download | fengari-d1214681a314f6ee50c2f02740f59bb9ce6902a3.tar.gz fengari-d1214681a314f6ee50c2f02740f59bb9ce6902a3.tar.bz2 fengari-d1214681a314f6ee50c2f02740f59bb9ce6902a3.zip |
src/loadlib.js: Fix using lua string instead of js string when getting env vars
Diffstat (limited to 'src/loadlib.js')
-rw-r--r-- | src/loadlib.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/loadlib.js b/src/loadlib.js index ecb5cd2..641948f 100644 --- a/src/loadlib.js +++ b/src/loadlib.js @@ -175,7 +175,8 @@ const ll_loadlib = function(L) { ** Set a path */ const setpath = function(L, fieldname, envname, dft) { - let nver = lua.lua_pushstring(L, lua.to_luastring(`${envname}${lua.LUA_VERSUFFIX}`, true)); + let nver = `${envname}${lua.LUA_VERSUFFIX}`; + lua.lua_pushstring(L, lua.to_luastring(nver)); let path = process.env[nver]; /* use versioned name */ if (path === undefined) /* no environment variable? */ path = process.env[envname]; /* try unversioned name */ |