Skip to content

Commit bb9bb79

Browse files
committed
If we see a fate a second time, and this offset gets multiple, make sure we include it into the sort.
1 parent 59d4cb1 commit bb9bb79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ops/nqp.ops

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2222,8 +2222,11 @@ inline op nqp_nfa_run_new(out PMC, in PMC, in STR, in INT) :base_core {
22222222
for (j = 0; j < total_fates; j++) {
22232223
if (found_fate)
22242224
fates[j - 1] = fates[j];
2225-
if (fates[j] == arg)
2225+
if (fates[j] == arg) {
22262226
found_fate = 1;
2227+
if (j < prev_fates)
2228+
prev_fates--;
2229+
}
22272230
}
22282231
if (found_fate)
22292232
fates[total_fates - 1] = arg;

0 commit comments

Comments
 (0)