From f6b260d2b97c40f360136d0c1320d8f6468f7e87 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 23 May 2017 00:05:31 +1000 Subject: src/ldo.js: luaG_runerror takes lua strings --- src/ldo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ldo.js b/src/ldo.js index cda1274..701a211 100644 --- a/src/ldo.js +++ b/src/ldo.js @@ -59,7 +59,7 @@ const luaD_growstack = function(L, n) { if (newsize < needed) newsize = needed; if (newsize > luaconf.LUAI_MAXSTACK) { /* stack overflow? */ luaD_reallocstack(L, ERRORSTACKSIZE); - ldebug.luaG_runerror(L, "stack overflow"); + ldebug.luaG_runerror(L, defs.to_luastring("stack overflow", true)); } else luaD_reallocstack(L, newsize); @@ -281,7 +281,7 @@ const tryfuncTM = function(L, off, func) { */ const stackerror = function(L) { if (L.nCcalls === llimit.LUAI_MAXCCALLS) - ldebug.luaG_runerror(L, "JS stack overflow"); + ldebug.luaG_runerror(L, defs.to_luastring("JS stack overflow", true)); else if (L.nCcalls >= llimit.LUAI_MAXCCALLS + (llimit.LUAI_MAXCCALLS >> 3)) luaD_throw(L, TS.LUA_ERRERR); /* error while handing stack error */ }; -- cgit v1.2.3-54-g00ecf