From: Mike Pall Date: Mon, 25 Oct 2010 12:53:37 +0000 (+0200) Subject: Fix collectgarbage("count") result if more than 2GB is in use. X-Git-Tag: v2.0.0-beta6~229 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=ab1b67f73a7ce94fdb91c85727604c714894363b;p=thirdparty%2FLuaJIT.git Fix collectgarbage("count") result if more than 2GB is in use. Thanks to Tony Finch. --- diff --git a/src/lib_base.c b/src/lib_base.c index 8f63effc..0a13f36b 100644 --- a/src/lib_base.c +++ b/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)