From 00a65a21e391c715b5571347231c1d0ec24c08d7 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 29 Jan 2018 21:41:12 +1100 Subject: src/lbaselib.js: Hardcode character codes (avoids charCodeAt) --- src/lbaselib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lbaselib.js') diff --git a/src/lbaselib.js b/src/lbaselib.js index f5af541..4212525 100644 --- a/src/lbaselib.js +++ b/src/lbaselib.js @@ -331,7 +331,7 @@ const luaB_assert = function(L) { const luaB_select = function(L) { let n = lua_gettop(L); - if (lua_type(L, 1) === LUA_TSTRING && lua_tostring(L, 1)[0] === "#".charCodeAt(0)) { + if (lua_type(L, 1) === LUA_TSTRING && lua_tostring(L, 1)[0] === 35 /* '#'.charCodeAt(0) */) { lua_pushinteger(L, n - 1); return 1; } else { -- cgit v1.2.3-54-g00ecf