Skip to content

Commit 459edb6

Browse files
committed
Always grow aux ref stack considering the reserve
1 parent 00328b0 commit 459edb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/state/extra.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ impl ExtraData {
270270
// Try to grow max stack size
271271
if self.ref_stack_top >= self.ref_stack_size {
272272
let mut inc = self.ref_stack_size; // Try to double stack size
273-
while inc > 0 && ffi::lua_checkstack(self.ref_thread, inc) == 0 {
273+
while inc > 0 && ffi::lua_checkstack(self.ref_thread, inc + REF_STACK_RESERVE) == 0 {
274274
inc /= 2;
275275
}
276276
if inc == 0 {

0 commit comments

Comments
 (0)