summaryrefslogtreecommitdiff
path: root/src/ldo.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-03 14:50:01 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-03 14:50:01 +0100
commita18f9b667d8c13fecf5bb57639262f67ec48b282 (patch)
treeae3abd38dd99429f3f7acf520b8df4c488779929 /src/ldo.js
parent3b116600d75012d5d4cd1b21343a0179712d32eb (diff)
downloadfengari-a18f9b667d8c13fecf5bb57639262f67ec48b282.tar.gz
fengari-a18f9b667d8c13fecf5bb57639262f67ec48b282.tar.bz2
fengari-a18f9b667d8c13fecf5bb57639262f67ec48b282.zip
Fixed checkmode test
Diffstat (limited to 'src/ldo.js')
-rw-r--r--src/ldo.js2
1 files changed, 1 insertions, 1 deletions
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);
}