From a18f9b667d8c13fecf5bb57639262f67ec48b282 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 3 Mar 2017 14:50:01 +0100 Subject: Fixed checkmode test --- src/ldo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ldo.js b/src/ldo.js index f4d8336..1d5c81b 100644 --- a/src/ldo.js +++ b/src/ldo.js @@ -521,7 +521,7 @@ class SParser { } const checkmode = function(L, mode, x) { - if (mode && mode.charAt(0) !== x.charAt(0)) { + if (mode && mode.indexOf(x.charAt(0))) { lapi.lua_pushstring(L, `attempt to load a ${x} chunk (mode is '${mode}')`); luaD_throw(L, TS.LUA_ERRSYNTAX); } -- cgit v1.2.3-70-g09d2