From 602dc35900af6f02d152138cc4641d803c29996d Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 15 Jun 2017 01:45:24 +1000 Subject: src/lstrlib.js: pass ESC charcode (not as string) --- src/lstrlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lstrlib.js b/src/lstrlib.js index ba1ef55..6ea1630 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -1287,7 +1287,7 @@ const add_s = function(ms, b, s, e) { i++; /* skip ESC */ if (!isdigit(news[i])) { if (news[i] !== L_ESC) - lauxlib.luaL_error(L, lua.to_luastring("invalid use of '%c' in replacement string"), sL_ESC); + lauxlib.luaL_error(L, lua.to_luastring("invalid use of '%c' in replacement string"), L_ESC); lauxlib.luaL_addchar(b, news[i]); } else if (news[i] === '0'.charCodeAt(0)) lauxlib.luaL_addlstring(b, ms.src.slice(s), e - s); -- cgit v1.2.3-70-g09d2