aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ldebug.c b/ldebug.c
index a716d95e..fa15eaf6 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -824,8 +824,11 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
824 va_start(argp, fmt); 824 va_start(argp, fmt);
825 msg = luaO_pushvfstring(L, fmt, argp); /* format message */ 825 msg = luaO_pushvfstring(L, fmt, argp); /* format message */
826 va_end(argp); 826 va_end(argp);
827 if (isLua(ci)) /* if Lua function, add source:line information */ 827 if (isLua(ci)) { /* if Lua function, add source:line information */
828 luaG_addinfo(L, msg, ci_func(ci)->p->source, getcurrentline(ci)); 828 luaG_addinfo(L, msg, ci_func(ci)->p->source, getcurrentline(ci));
829 setobjs2s(L, L->top - 2, L->top - 1); /* remove 'msg' from the stack */
830 L->top--;
831 }
829 luaG_errormsg(L); 832 luaG_errormsg(L);
830} 833}
831 834