From fb787627c39366de507ee713b9042f33a33395b1 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 5 May 2017 11:13:32 +1000 Subject: src/ldebug.js: Use luaO_pushfstring --- src/ldebug.js | 4 +--- 1 file changed, 1 insertion(+), 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) { -- cgit v1.2.3-70-g09d2