فهرست منبع

Fix collectgarbage("count") result if more than 2GB is in use.

Thanks to Tony Finch.
Mike Pall 15 سال پیش
والد
کامیت
ab1b67f73a
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/lib_base.c

+ 1 - 1
src/lib_base.c

@@ -359,7 +359,7 @@ LJLIB_CF(collectgarbage)
     "\4stop\7restart\7collect\5count\1\377\4step\10setpause\12setstepmul");
   int32_t data = lj_lib_optint(L, 2, 0);
   if (opt == LUA_GCCOUNT) {
-    setnumV(L->top, cast_num((int32_t)G(L)->gc.total)/1024.0);
+    setnumV(L->top, cast_num(G(L)->gc.total)/1024.0);
   } else {
     int res = lua_gc(L, opt, data);
     if (opt == LUA_GCSTEP)