aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-06 15:00:37 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-06 15:00:37 +0100
commit342a7db19607446720770cd2cfc5d275ce3f2ca9 (patch)
treedfcc5c10721b71b87eeb67138c1332d4763d0aee /src
parentc760da2581a144ca120b07c52963e1d422f725f1 (diff)
downloadfengari-342a7db19607446720770cd2cfc5d275ce3f2ca9.tar.gz
fengari-342a7db19607446720770cd2cfc5d275ce3f2ca9.tar.bz2
fengari-342a7db19607446720770cd2cfc5d275ce3f2ca9.zip
checkmode, again
Diffstat (limited to 'src')
-rw-r--r--src/ldo.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ldo.js b/src/ldo.js
index e9bc9eb..6773278 100644
--- a/src/ldo.js
+++ b/src/ldo.js
@@ -521,7 +521,7 @@ class SParser {
}
const checkmode = function(L, mode, x) {
- if (mode && mode.indexOf(x.charAt(0)) !== -1) {
+ if (mode && mode.indexOf(x.charAt(0)) === -1) {
lapi.lua_pushstring(L, `attempt to load a ${x} chunk (mode is '${mode}')`);
luaD_throw(L, TS.LUA_ERRSYNTAX);
}