Small tidy to start of match optimizations.

This commit is contained in:
ph10 2018-01-01 15:05:27 +00:00
parent ed8d9a2229
commit 3a18bdb690
2 changed files with 14 additions and 0 deletions

View File

@ -3522,6 +3522,12 @@ for (;;)
if ((start_bits[c/8] & (1 << (c&7))) != 0) break;
start_match++;
}
/* See comment above in first_cu checking about the next line. */
if ((mb->moptions & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) == 0 &&
start_match >= mb->end_subject)
break;
}
} /* End of first code unit handling */

View File

@ -6526,6 +6526,14 @@ for(;;)
if ((start_bits[c/8] & (1 << (c&7))) != 0) break;
start_match++;
}
/* See comment above in first_cu checking about the next few lines. */
if (!mb->partial && start_match >= mb->end_subject)
{
rc = MATCH_NOMATCH;
break;
}
}
} /* End first code unit handling */