Explorar o código

Fix debug.getinfo() argument check.

Thanks to Sergey Ostanevich.
Mike Pall %!s(int64=6) %!d(string=hai) anos
pai
achega
0cd643d7cf
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/lj_debug.c

+ 1 - 1
src/lj_debug.c

@@ -440,7 +440,7 @@ int lj_debug_getinfo(lua_State *L, const char *what, lj_Debug *ar, int ext)
   GCfunc *fn;
   if (*what == '>') {
     TValue *func = L->top - 1;
-    api_check(L, tvisfunc(func));
+    if (!tvisfunc(func)) return 0;
     fn = funcV(func);
     L->top--;
     what++;