diff options
author | daurnimator <quae@daurnimator.com> | 2017-12-13 11:18:50 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-12-13 15:03:59 +1100 |
commit | ce967cb8576447a350a211c7205a8983c964a8df (patch) | |
tree | e8cbd246fff09536bcdfcb5bec86bafabea63ff9 /src/ldump.js | |
parent | 6ba5df0961779e1e9f8347e1f26091b8c63e105f (diff) | |
download | fengari-ce967cb8576447a350a211c7205a8983c964a8df.tar.gz fengari-ce967cb8576447a350a211c7205a8983c964a8df.tar.bz2 fengari-ce967cb8576447a350a211c7205a8983c964a8df.zip |
src/ldump.js: Keep LUAC_DATA in array form
Diffstat (limited to 'src/ldump.js')
-rw-r--r-- | src/ldump.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ldump.js b/src/ldump.js index 8b9b1ff..627a252 100644 --- a/src/ldump.js +++ b/src/ldump.js @@ -3,7 +3,7 @@ const defs = require('./defs.js'); const CT = defs.constant_types; -const LUAC_DATA = "\x19\x93\r\n\x1a\n"; +const LUAC_DATA = [25, 147, 13, 10, 26, 10]; const LUAC_INT = 0x5678; const LUAC_NUM = 370.5; const LUAC_VERSION = Number.parseInt(defs.LUA_VERSION_MAJOR) * 16 + Number.parseInt(defs.LUA_VERSION_MINOR); @@ -167,8 +167,7 @@ const DumpHeader = function(D) { DumpLiteral(defs.LUA_SIGNATURE, D); DumpByte(LUAC_VERSION, D); DumpByte(LUAC_FORMAT, D); - let cdata = LUAC_DATA.split('').map(e => e.charCodeAt(0)); - DumpBlock(cdata, cdata.length, D); + DumpBlock(LUAC_DATA, LUAC_DATA.length, D); DumpByte(4, D); // intSize DumpByte(4, D); // size_tSize DumpByte(4, D); // instructionSize |