From ce967cb8576447a350a211c7205a8983c964a8df Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 13 Dec 2017 11:18:50 +1100 Subject: src/ldump.js: Keep LUAC_DATA in array form --- src/ldump.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2