diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-06-12 15:50:13 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-06-12 15:50:13 +0200 |
commit | a8449d7b4beb346099f57d64f0c58ab38cc2910f (patch) | |
tree | d12b81c3a4830009f2f3ddf1a0456270c08b3a97 /src | |
parent | 2ff14d930ec8bee0c2c0190c1dd6f5584236342d (diff) | |
download | fengari-a8449d7b4beb346099f57d64f0c58ab38cc2910f.tar.gz fengari-a8449d7b4beb346099f57d64f0c58ab38cc2910f.tar.bz2 fengari-a8449d7b4beb346099f57d64f0c58ab38cc2910f.zip |
lstrlib.js: missing charCodeAt and misspelled ms.src
Diffstat (limited to 'src')
-rw-r--r-- | src/lstrlib.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js index ccb0c16..b19d4d8 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -1036,10 +1036,10 @@ const match = function(ms, s, p) { } case 'f'.charCodeAt(0): { p += 2; - if (ms.p[p] !== '[') + if (ms.p[p] !== '['.charCodeAt(0)) lauxlib.luaL_error(ms.L, lua.to_luastring("missing '[' after '%%f' in pattern")); let ep = classend(ms, p); /* points to what is next */ - let previous = s === ms.src_init ? 0 : ms.s[s-1]; + let previous = s === ms.src_init ? 0 : ms.src[s-1]; if (!matchbracketclass(ms, previous, p, ep - 1) && matchbracketclass(ms, ms.src[s], p, ep - 1)) { p = ep; gotoinit = true; break; } |