summaryrefslogtreecommitdiff
path: root/src/ldblib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-15 14:57:13 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-15 14:57:13 +1100
commite0e5d05626fcd6cb4622abcaae9fc951d9ae91b1 (patch)
tree49531b2a69c166ad193adddf50edbadb5e1a91a1 /src/ldblib.js
parent6099ba186c38c854332ec483edd6cbca3cf94871 (diff)
parent8249248f80467f1660509a30623f40bb9ff1eba7 (diff)
downloadfengari-e0e5d05626fcd6cb4622abcaae9fc951d9ae91b1.tar.gz
fengari-e0e5d05626fcd6cb4622abcaae9fc951d9ae91b1.tar.bz2
fengari-e0e5d05626fcd6cb4622abcaae9fc951d9ae91b1.zip
Merge branch 'Uint8Array'
Diffstat (limited to 'src/ldblib.js')
-rw-r--r--src/ldblib.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ldblib.js b/src/ldblib.js
index 746d3bf..df7d2ff 100644
--- a/src/ldblib.js
+++ b/src/ldblib.js
@@ -306,7 +306,7 @@ const unmakemask = function(mask, smask) {
if (mask & lua.LUA_MASKCALL) smask[i++] = "c".charCodeAt(0);
if (mask & lua.LUA_MASKRET) smask[i++] = "r".charCodeAt(0);
if (mask & lua.LUA_MASKLINE) smask[i++] = "l".charCodeAt(0);
- return smask;
+ return smask.subarray(0, i);
};
const db_sethook = function(L) {
@@ -344,7 +344,7 @@ const db_sethook = function(L) {
const db_gethook = function(L) {
let thread = getthread(L);
let L1 = thread.thread;
- let buff = [];
+ let buff = new Uint8Array(5);
let mask = lua.lua_gethookmask(L1);
let hook = lua.lua_gethook(L1);
if (hook === null) /* no hook? */