aboutsummaryrefslogtreecommitdiff
path: root/lpvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lpvm.c')
-rw-r--r--lpvm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lpvm.c b/lpvm.c
index 122c8f4..a934478 100644
--- a/lpvm.c
+++ b/lpvm.c
@@ -336,8 +336,8 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e,
336 do { /* remove pending calls */ 336 do { /* remove pending calls */
337 assert(pstack > getstackbase(L, ptop)); 337 assert(pstack > getstackbase(L, ptop));
338 auxlab = (--pstack)->ls; 338 auxlab = (--pstack)->ls;
339 } while (auxlab == NULL || (pstack->p != &giveup && labelf != LFAIL && !testlabel(pstack->ls->cs, *labelf))); 339 } while (auxlab == NULL || !(pstack->p == &giveup || testlabel(pstack->ls->cs, *labelf)));
340 if (pstack->p == &giveup || pstack->s != NULL) { /* labeled failure: giveup or backtrack frame */ 340 if (pstack->s != NULL) { /* labeled failure: giveup or backtrack frame */
341 stack = pstack; 341 stack = pstack;
342 s = stack->s; 342 s = stack->s;
343 if (ndyncap > 0) /* is there matchtime captures? */ 343 if (ndyncap > 0) /* is there matchtime captures? */
@@ -349,7 +349,7 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e,
349 stack->s = NULL; 349 stack->s = NULL;
350 stack->p = pk; /* save return address */ 350 stack->p = pk; /* save return address */
351 stack->ls = NULL; 351 stack->ls = NULL;
352 stack->caplevel = captop; /* TODO: necessary?? */ 352 stack->caplevel = captop; /* TODO: really necessary?? */
353 stack++; 353 stack++;
354 } 354 }
355 p = pstack->p; 355 p = pstack->p;
@@ -366,7 +366,7 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e,
366 res = resdyncaptures(L, fr, s - o, e - o); /* get result */ 366 res = resdyncaptures(L, fr, s - o, e - o); /* get result */
367 if (res == -1) { /* fail? */ 367 if (res == -1) { /* fail? */
368 *labelf = LFAIL; /* labeled failure */ 368 *labelf = LFAIL; /* labeled failure */
369 *sfail = (const char *) s; /* TODO: ??? */ 369 *sfail = (const char *) s;
370 pk = NULL; 370 pk = NULL;
371 goto fail; 371 goto fail;
372 } 372 }