summaryrefslogtreecommitdiff
path: root/src/ldump.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-13 15:13:27 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-13 15:13:27 +1100
commit3e7c102eefbaae9e6bc839b11bba79aee1c5e040 (patch)
treec811b42cc9ffb08a0bf8a93d6141324d707f4953 /src/ldump.js
parentd1d2a636ea67c2e30a34660eeb6c7da544646bea (diff)
downloadfengari-3e7c102eefbaae9e6bc839b11bba79aee1c5e040.tar.gz
fengari-3e7c102eefbaae9e6bc839b11bba79aee1c5e040.tar.bz2
fengari-3e7c102eefbaae9e6bc839b11bba79aee1c5e040.zip
Introduce defs.string_of to create string from bytes
Diffstat (limited to 'src/ldump.js')
-rw-r--r--src/ldump.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ldump.js b/src/ldump.js
index 627a252..964d6ff 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 = [25, 147, 13, 10, 26, 10];
+const LUAC_DATA = defs.string_of(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);
@@ -30,7 +30,7 @@ const DumpLiteral = function(s, D) {
};
const DumpByte = function(y, D) {
- DumpBlock([y], 1, D);
+ DumpBlock(defs.string_of(y), 1, D);
};
const DumpInt = function(x, D) {