summaryrefslogtreecommitdiff
path: root/src/lundump.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lundump.js')
-rw-r--r--src/lundump.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lundump.js b/src/lundump.js
index b79e6ea..5a6d8c4 100644
--- a/src/lundump.js
+++ b/src/lundump.js
@@ -5,6 +5,7 @@ const DataView = require('buffer-dataview');
const fs = require('fs');
const assert = require('assert');
+const lua = require('./lua.js');
const LClosure = require('./lobject.js').LClosure;
const TValue = require('./lobject.js').TValue;
const Proto = require('./lfunc.js').Proto;
@@ -256,7 +257,7 @@ class BytecodeParser {
}
checkHeader() {
- if (this.readString(4) !== "\x1bLua")
+ if (this.readString(4) !== lua.LUA_SIGNATURE)
throw new Error("bad LUA_SIGNATURE, expected '<esc>Lua'");
if (this.readByte() !== 0x53)