summaryrefslogtreecommitdiff
path: root/src/lundump.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-29 14:59:25 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-29 22:04:32 +1100
commit14f5bb167951ad893760cdb526364e9edf1213ef (patch)
treecabfa9ce9f75479e036428b22a0e78ef9d48598c /src/lundump.js
parent9aaddb7c9814d97502adb0e115c613598923b8d5 (diff)
downloadfengari-14f5bb167951ad893760cdb526364e9edf1213ef.tar.gz
fengari-14f5bb167951ad893760cdb526364e9edf1213ef.tar.bz2
fengari-14f5bb167951ad893760cdb526364e9edf1213ef.zip
src/: Export LUA_SIGNATURE as lua string instead of js string
Diffstat (limited to 'src/lundump.js')
-rw-r--r--src/lundump.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lundump.js b/src/lundump.js
index 7a9fde1..cf3fafa 100644
--- a/src/lundump.js
+++ b/src/lundump.js
@@ -56,7 +56,7 @@ class BytecodeParser {
if (name[0] === 64 /* ('@').charCodeAt(0) */ || name[0] === 61 /* ('=').charCodeAt(0) */)
this.name = name.subarray(1);
- else if (name[0] == LUA_SIGNATURE.charCodeAt(0))
+ else if (name[0] == LUA_SIGNATURE[0])
this.name = to_luastring("binary string", true);
else
this.name = name;
@@ -248,7 +248,7 @@ class BytecodeParser {
}
checkHeader() {
- this.checkliteral(to_luastring(LUA_SIGNATURE.substring(1)), "not a"); /* 1st char already checked */
+ this.checkliteral(LUA_SIGNATURE.subarray(1), "not a"); /* 1st char already checked */
if (this.readByte() !== 0x53)
this.error("version mismatch in");