From 90b0ac6495cb5b4f06b795bef3da346a55581284 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 13 Feb 2014 15:25:20 -0200 Subject: limit to 'gcstepmul' imposed by 'lua_gc' (+ some details in 'lgc.c') --- lapi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 0fcb6eaa..d5765cc9 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.193 2014/01/27 13:34:32 roberto Exp roberto $ +** $Id: lapi.c,v 2.194 2014/02/13 12:11:34 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -1086,6 +1086,7 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { } case LUA_GCSETSTEPMUL: { res = g->gcstepmul; + if (data < 40) data = 40; /* avoid ridiculous low values (and 0) */ g->gcstepmul = data; break; } -- cgit v1.2.3-55-g6feb