aboutsummaryrefslogtreecommitdiff
path: root/src/ldebug.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-05 11:13:32 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-05 11:13:32 +1000
commitfb787627c39366de507ee713b9042f33a33395b1 (patch)
tree067e115112a76d9bb8012cd78236d79fcae2cd75 /src/ldebug.js
parent2895a2321f686a69418313f14c1df116e4f1738e (diff)
downloadfengari-fb787627c39366de507ee713b9042f33a33395b1.tar.gz
fengari-fb787627c39366de507ee713b9042f33a33395b1.tar.bz2
fengari-fb787627c39366de507ee713b9042f33a33395b1.zip
src/ldebug.js: Use luaO_pushfstring
Diffstat (limited to 'src/ldebug.js')
-rw-r--r--src/ldebug.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ldebug.js b/src/ldebug.js
index 9c67f26..aed41e2 100644
--- a/src/ldebug.js
+++ b/src/ldebug.js
@@ -571,9 +571,7 @@ const luaG_addinfo = function(L, msg, src, line) {
if (src)
buff = lobject.luaO_chunkid(src, luaconf.LUA_IDSIZE);
- L.stack[L.top++] = L.l_G.intern(defs.to_luastring(`${defs.to_jsstring(buff)}:${line}: ${defs.to_jsstring(msg)}`));
-
- return L.stack[L.top - 1];
+ return lobject.luaO_pushfstring(L, defs.to_luastring("%s:%d: %s", true), buff, line, msg)
};
const luaG_runerror = function(L, fmt, ...argp) {