diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-29 21:41:12 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-29 22:07:10 +1100 |
commit | 00a65a21e391c715b5571347231c1d0ec24c08d7 (patch) | |
tree | a8d8213393cc27eff2d78bd5a9fbf724cf6e69ff | |
parent | 370fd190c38242d152525ad3ae38104620c3359f (diff) | |
download | fengari-00a65a21e391c715b5571347231c1d0ec24c08d7.tar.gz fengari-00a65a21e391c715b5571347231c1d0ec24c08d7.tar.bz2 fengari-00a65a21e391c715b5571347231c1d0ec24c08d7.zip |
src/lbaselib.js: Hardcode character codes (avoids charCodeAt)
-rw-r--r-- | src/lbaselib.js | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |