summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-29 21:41:12 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-29 22:07:10 +1100
commit00a65a21e391c715b5571347231c1d0ec24c08d7 (patch)
treea8d8213393cc27eff2d78bd5a9fbf724cf6e69ff /src
parent370fd190c38242d152525ad3ae38104620c3359f (diff)
downloadfengari-00a65a21e391c715b5571347231c1d0ec24c08d7.tar.gz
fengari-00a65a21e391c715b5571347231c1d0ec24c08d7.tar.bz2
fengari-00a65a21e391c715b5571347231c1d0ec24c08d7.zip
src/lbaselib.js: Hardcode character codes (avoids charCodeAt)
Diffstat (limited to 'src')
-rw-r--r--src/lbaselib.js2
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 {