summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-07 02:52:40 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-07 03:34:56 +1100
commite46d3e7d8d7226d49aad05f5a9c639c77d53bb04 (patch)
treefe3e99cbfce31d7d3495c0f861cbdc0aad67167a /tests
parent6ffe07fc5d16ee9acdcd6651d433ce13b193cd15 (diff)
downloadfengari-e46d3e7d8d7226d49aad05f5a9c639c77d53bb04.tar.gz
fengari-e46d3e7d8d7226d49aad05f5a9c639c77d53bb04.tar.bz2
fengari-e46d3e7d8d7226d49aad05f5a9c639c77d53bb04.zip
Introduce luastring_indexOf as Uint8Array.indexOf doesn't exist everywhere
Diffstat (limited to 'tests')
-rw-r--r--tests/test-suite/ltests.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-suite/ltests.js b/tests/test-suite/ltests.js
index 08bb603..5847746 100644
--- a/tests/test-suite/ltests.js
+++ b/tests/test-suite/ltests.js
@@ -721,9 +721,9 @@ const sethook = function(L) {
const smask = lauxlib.luaL_checkstring(L, 2);
let count = lauxlib.luaL_optinteger(L, 3, 0);
let mask = 0;
- if (smask.indexOf('c'.charCodeAt(0)) >= 0) mask |= lua.LUA_MASKCALL;
- if (smask.indexOf('r'.charCodeAt(0)) >= 0) mask |= lua.LUA_MASKRET;
- if (smask.indexOf('l'.charCodeAt(0)) >= 0) mask |= lua.LUA_MASKLINE;
+ if (lua.luastring_indexOf(smask, 'c'.charCodeAt(0)) >= 0) mask |= lua.LUA_MASKCALL;
+ if (lua.luastring_indexOf(smask, 'r'.charCodeAt(0)) >= 0) mask |= lua.LUA_MASKRET;
+ if (lua.luastring_indexOf(smask, 'l'.charCodeAt(0)) >= 0) mask |= lua.LUA_MASKLINE;
if (count > 0) mask |= lua.LUA_MASKCOUNT;
sethookaux(L, mask, count, scpt);
}