소스 검색

Fix debug.getinfo() argument check.

Thanks to Sergey Ostanevich.
Mike Pall 6 년 전
부모
커밋
0cd643d7cf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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++;