diff options
author | daurnimator <quae@daurnimator.com> | 2017-12-15 14:57:13 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-12-15 14:57:13 +1100 |
commit | e0e5d05626fcd6cb4622abcaae9fc951d9ae91b1 (patch) | |
tree | 49531b2a69c166ad193adddf50edbadb5e1a91a1 /src/lundump.js | |
parent | 6099ba186c38c854332ec483edd6cbca3cf94871 (diff) | |
parent | 8249248f80467f1660509a30623f40bb9ff1eba7 (diff) | |
download | fengari-e0e5d05626fcd6cb4622abcaae9fc951d9ae91b1.tar.gz fengari-e0e5d05626fcd6cb4622abcaae9fc951d9ae91b1.tar.bz2 fengari-e0e5d05626fcd6cb4622abcaae9fc951d9ae91b1.zip |
Merge branch 'Uint8Array'
Diffstat (limited to 'src/lundump.js')
-rw-r--r-- | src/lundump.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lundump.js b/src/lundump.js index ff87903..e49c376 100644 --- a/src/lundump.js +++ b/src/lundump.js @@ -25,7 +25,7 @@ class BytecodeParser { assert(defs.is_luastring(name)); if (name[0] == defs.char["@"] || name[0] == defs.char["="]) - this.name = name.slice(1); + this.name = name.subarray(1); else if (name[0] == defs.LUA_SIGNATURE.charCodeAt(0)) this.name = defs.to_luastring("binary string", true); else @@ -46,7 +46,7 @@ class BytecodeParser { let u8 = new Uint8Array(size); if(lzio.luaZ_read(this.Z, u8, 0, size) !== 0) this.error("truncated"); - return Array.from(u8); + return u8; } readByte() { |