minor 1
This commit is contained in:
6
pike.c
6
pike.c
@@ -507,7 +507,7 @@ int re_comp(rcode *prog, const char *re, int anchored)
|
|||||||
case SAVE: \
|
case SAVE: \
|
||||||
if (sub->ref > 1) { \
|
if (sub->ref > 1) { \
|
||||||
for (j = 0; j < subidx; j++) { \
|
for (j = 0; j < subidx; j++) { \
|
||||||
if (nsubs[j].ref <= 0) { \
|
if (!nsubs[j].ref) { \
|
||||||
s1 = &nsubs[j]; \
|
s1 = &nsubs[j]; \
|
||||||
goto freedsub##nn; \
|
goto freedsub##nn; \
|
||||||
} \
|
} \
|
||||||
@@ -583,9 +583,11 @@ int re_pikevm(rcode *prog, const char *s, const char **subp, int nsubp)
|
|||||||
npc += *(npc+1) * 2 + 2;
|
npc += *(npc+1) * 2 + 2;
|
||||||
goto addthread;
|
goto addthread;
|
||||||
case MATCH:
|
case MATCH:
|
||||||
|
if (matched)
|
||||||
|
matched->ref = 0;
|
||||||
matched = nsub;
|
matched = nsub;
|
||||||
for(i++; i < clist->n; i++)
|
for(i++; i < clist->n; i++)
|
||||||
clist->t[i].sub->ref--;
|
clist->t[i].sub->ref = 0;
|
||||||
goto BreakFor;
|
goto BreakFor;
|
||||||
}
|
}
|
||||||
nsub->ref--;
|
nsub->ref--;
|
||||||
|
|||||||
Reference in New Issue
Block a user