summaryrefslogtreecommitdiff
path: root/src/ldump.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-06 19:32:31 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-06 19:32:43 +1100
commita0fa83dc9c170542630dbc83d1732d3e7a6313e9 (patch)
treef49965560f11a43e0fcb8dbc6bae1ce9ee22cb93 /src/ldump.js
parent110636150e4b3470e21622b022bec2844d8e8b2f (diff)
downloadfengari-a0fa83dc9c170542630dbc83d1732d3e7a6313e9.tar.gz
fengari-a0fa83dc9c170542630dbc83d1732d3e7a6313e9.tar.bz2
fengari-a0fa83dc9c170542630dbc83d1732d3e7a6313e9.zip
Expose lua.luastring_of to construct a lua 'string' from raw byte values
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 7e62da3..f736e22 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 = defs.string_of(25, 147, 13, 10, 26, 10);
+const LUAC_DATA = defs.luastring_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(defs.string_of(y), 1, D);
+ DumpBlock(defs.luastring_of(y), 1, D);
};
const DumpInt = function(x, D) {