summaryrefslogtreecommitdiff
path: root/src/ldo.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-02 21:15:42 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-03 14:39:45 +0100
commit0ba3c5d516b1a0b67cff6d5f4b4583284086dd4b (patch)
tree72db338fe02e0e4b84238a54e422bbc21b40a5d0 /src/ldo.js
parent319c40c4439a9eda7bd4a68769057cb12b04755a (diff)
downloadfengari-0ba3c5d516b1a0b67cff6d5f4b4583284086dd4b.tar.gz
fengari-0ba3c5d516b1a0b67cff6d5f4b4583284086dd4b.tar.bz2
fengari-0ba3c5d516b1a0b67cff6d5f4b4583284086dd4b.zip
load, luaL_loadbuffer(x), luaL_loadstring, lua_replace, lua_isnone, lua_isnoneornil, lua_setupvalue
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 668ea9b..f4d8336 100644
--- a/src/ldo.js
+++ b/src/ldo.js
@@ -521,7 +521,7 @@ class SParser {
}
const checkmode = function(L, mode, x) {
- if (mode && mode !== x) {
+ if (mode && mode.charAt(0) !== x.charAt(0)) {
lapi.lua_pushstring(L, `attempt to load a ${x} chunk (mode is '${mode}')`);
luaD_throw(L, TS.LUA_ERRSYNTAX);
}