Explorar o código

Fix argument error handling on Lua stacks without a frame.

Mike Pall %!s(int64=13) %!d(string=hai) anos
pai
achega
7498ee204e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/lj_debug.c

+ 2 - 0
src/lj_debug.c

@@ -279,6 +279,8 @@ const char *lj_debug_funcname(lua_State *L, TValue *frame, const char **name)
   TValue *pframe;
   GCfunc *fn;
   BCPos pc;
+  if (frame <= tvref(L->stack))
+    return NULL;
   if (frame_isvarg(frame))
     frame = frame_prevd(frame);
   pframe = frame_prev(frame);