pike.c: fix edge case
This commit is contained in:
8
pike.c
8
pike.c
@@ -298,6 +298,10 @@ static int compilecode(const char *re_loc, rcode *prog, int sizecode)
|
||||
memcpy(&code[PC], &code[term], size*sizeof(int));
|
||||
PC += size;
|
||||
}
|
||||
if (!mincnt) {
|
||||
nojmp = 2;
|
||||
mincnt++;
|
||||
}
|
||||
for (i = maxcnt-mincnt; i > 0; i--) {
|
||||
EMIT(PC++, SPLIT);
|
||||
EMIT(PC++, REL(PC, PC+((size+2)*i)));
|
||||
@@ -305,10 +309,8 @@ static int compilecode(const char *re_loc, rcode *prog, int sizecode)
|
||||
memcpy(&code[PC], &code[term], size*sizeof(int));
|
||||
PC += size;
|
||||
}
|
||||
if (!mincnt && maxcnt) {
|
||||
nojmp = 1;
|
||||
if (nojmp == 2)
|
||||
goto zcase;
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
if (PC == term)
|
||||
|
||||
Reference in New Issue
Block a user