From d1214681a314f6ee50c2f02740f59bb9ce6902a3 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 17 Aug 2017 15:38:15 +1000 Subject: src/loadlib.js: Fix using lua string instead of js string when getting env vars --- src/loadlib.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- cgit v1.2.3-70-g09d2