aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ldo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldo.c b/ldo.c
index b0d37bf7..6824a21f 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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;