summaryrefslogtreecommitdiff
path: root/src/lstrlib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-29 17:18:58 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-29 17:18:58 +1000
commita0acc63c7d0171f1b45bebf9d74744515f9217c7 (patch)
tree3b231b8b24f549240f38317d1f020e1eae072dbb /src/lstrlib.js
parent0006432890dd0135152d6334155ef4c1b860b717 (diff)
downloadfengari-a0acc63c7d0171f1b45bebf9d74744515f9217c7.tar.gz
fengari-a0acc63c7d0171f1b45bebf9d74744515f9217c7.tar.bz2
fengari-a0acc63c7d0171f1b45bebf9d74744515f9217c7.zip
Don't pass user input as format to luaL_error
Diffstat (limited to 'src/lstrlib.js')
-rw-r--r--src/lstrlib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js
index 41c48ef..56817a0 100644
--- a/src/lstrlib.js
+++ b/src/lstrlib.js
@@ -1107,7 +1107,7 @@ const push_onecapture = function(ms, i, s, e) {
if (i === 0)
lua.lua_pushlstring(ms.L, ms.src.slice(s), e - s); /* add whole match */
else
- lauxlib.luaL_error(ms.L, lua.to_luastring(`invalid capture index %${i + 1}`));
+ lauxlib.luaL_error(ms.L, lua.to_luastring("invalid capture index %%%d"), i + 1);
} else {
let l = ms.capture[i].len;
if (l === CAP_UNFINISHED) lauxlib.luaL_error(ms.L, lua.to_luastring("unfinished capture", true));