diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-29 14:51:42 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-29 14:51:42 +1100 |
commit | 5439a23f4a60788a511704c9ae3c754222c15a64 (patch) | |
tree | c4433669ee2abd1a18135bed9d3522d62c390fb7 /src | |
parent | 43a65c186b9ffc3793260c0fa8612bba515440fe (diff) | |
download | fengari-5439a23f4a60788a511704c9ae3c754222c15a64.tar.gz fengari-5439a23f4a60788a511704c9ae3c754222c15a64.tar.bz2 fengari-5439a23f4a60788a511704c9ae3c754222c15a64.zip |
src/lundump.js: Remove use of defs.char
Diffstat (limited to 'src')
-rw-r--r-- | src/lundump.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lundump.js b/src/lundump.js index 1255114..7a9fde1 100644 --- a/src/lundump.js +++ b/src/lundump.js @@ -2,7 +2,6 @@ const { LUA_SIGNATURE, - char, constant_types: { LUA_TBOOLEAN, LUA_TLNGSTR, @@ -41,7 +40,7 @@ const { ZIO } = require('./lzio.js'); -let LUAC_DATA = [0x19, 0x93, char["\r"], char["\n"], 0x1a, char["\n"]]; +let LUAC_DATA = [0x19, 0x93, 13, 10, 0x1a, 10]; class BytecodeParser { @@ -55,7 +54,7 @@ class BytecodeParser { lua_assert(Z instanceof ZIO, "BytecodeParser only operates on a ZIO"); lua_assert(is_luastring(name)); - if (name[0] == char["@"] || name[0] == char["="]) + if (name[0] === 64 /* ('@').charCodeAt(0) */ || name[0] === 61 /* ('=').charCodeAt(0) */) this.name = name.subarray(1); else if (name[0] == LUA_SIGNATURE.charCodeAt(0)) this.name = to_luastring("binary string", true); |