diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.282 2013/09/13 16:21:52 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.283 2014/02/13 12:11:34 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -185,9 +185,8 @@ static int luaB_collectgarbage (lua_State *L) { | |||
185 | switch (o) { | 185 | switch (o) { |
186 | case LUA_GCCOUNT: { | 186 | case LUA_GCCOUNT: { |
187 | int b = lua_gc(L, LUA_GCCOUNTB, 0); | 187 | int b = lua_gc(L, LUA_GCCOUNTB, 0); |
188 | lua_pushnumber(L, res + ((lua_Number)b/1024)); | 188 | lua_pushnumber(L, (lua_Number)res + ((lua_Number)b/1024)); |
189 | lua_pushinteger(L, b); | 189 | return 1; |
190 | return 2; | ||
191 | } | 190 | } |
192 | case LUA_GCSTEP: case LUA_GCISRUNNING: { | 191 | case LUA_GCSTEP: case LUA_GCISRUNNING: { |
193 | lua_pushboolean(L, res); | 192 | lua_pushboolean(L, res); |