aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lpvm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lpvm.c b/lpvm.c
index e8ff287..b200dce 100644
--- a/lpvm.c
+++ b/lpvm.c
@@ -351,17 +351,18 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e,
351 if (pstack->p == &giveup || pstack->s != NULL) { /* labeled failure: giveup or backtrack frame */ 351 if (pstack->p == &giveup || pstack->s != NULL) { /* labeled failure: giveup or backtrack frame */
352 stack = pstack; 352 stack = pstack;
353 s = stack->s; 353 s = stack->s;
354 if (ndyncap > 0) /* is there matchtime captures? */
355 ndyncap -= removedyncap(L, capture, stack->caplevel, captop);
356 captop = stack->caplevel;
354 } else { /* labeled failure: recovery frame */ 357 } else { /* labeled failure: recovery frame */
355 if (stack == stacklimit) 358 if (stack == stacklimit)
356 stack = doublestack(L, &stacklimit, ptop); 359 stack = doublestack(L, &stacklimit, ptop);
357 stack->s = NULL; 360 stack->s = NULL;
358 stack->p = pk; /* save return address */ 361 stack->p = pk; /* save return address */
359 stack->ls = NULL; 362 stack->ls = NULL;
363 stack->caplevel = captop; /* TODO: necessary?? */
360 stack++; 364 stack++;
361 } 365 }
362 if (ndyncap > 0) /* is there matchtime captures? */
363 ndyncap -= removedyncap(L, capture, pstack->caplevel, captop);
364 captop = pstack->caplevel;
365 p = pstack->p; 366 p = pstack->p;
366 continue; 367 continue;
367 } 368 }