From ef0784b2982e65af05982d8e1e18ef1d45ea96ad Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 7 Jan 2018 03:28:43 +1100 Subject: Avoid Uint8Array.slice (IE compat) --- src/loadlib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/loadlib.js') diff --git a/src/loadlib.js b/src/loadlib.js index c859798..2e68ffd 100644 --- a/src/loadlib.js +++ b/src/loadlib.js @@ -263,12 +263,12 @@ const addtoclib = function(L, path, plib) { }; const pushnexttemplate = function(L, path) { - while (path[0] === lua.LUA_PATH_SEP.charCodeAt(0)) path = path.slice(1); /* skip separators */ + while (path[0] === lua.LUA_PATH_SEP.charCodeAt(0)) path = path.subarray(1); /* skip separators */ if (path.length === 0) return null; /* no more templates */ let l = lua.luastring_indexOf(path, lua.LUA_PATH_SEP.charCodeAt(0)); /* find next separator */ if (l < 0) l = path.length; lua.lua_pushlstring(L, path, l); /* template */ - return path.slice(l); + return path.subarray(l); }; const searchpath = function(L, name, path, sep, dirsep) { -- cgit v1.2.3-54-g00ecf