diff options
Diffstat (limited to '')
-rw-r--r-- | ldo.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -319,7 +319,7 @@ int luaD_growstack (lua_State *L, int n, int raiseerror) { | |||
319 | return 0; /* if not 'raiseerror', just signal it */ | 319 | return 0; /* if not 'raiseerror', just signal it */ |
320 | } | 320 | } |
321 | else if (n < MAXSTACK) { /* avoids arithmetic overflows */ | 321 | else if (n < MAXSTACK) { /* avoids arithmetic overflows */ |
322 | int newsize = 2 * size; /* tentative new size */ | 322 | int newsize = size + (size >> 1); /* tentative new size (size * 1.5) */ |
323 | int needed = cast_int(L->top.p - L->stack.p) + n; | 323 | int needed = cast_int(L->top.p - L->stack.p) + n; |
324 | if (newsize > MAXSTACK) /* cannot cross the limit */ | 324 | if (newsize > MAXSTACK) /* cannot cross the limit */ |
325 | newsize = MAXSTACK; | 325 | newsize = MAXSTACK; |