diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2023-11-27 14:20:43 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2023-11-27 14:20:43 -0500 |
| commit | 3a728b28df662af9ad588a9a95c94ce030a3f4dd (patch) | |
| tree | 4e89eab75c0744e28d3748bb2b029b21ad9038dc /match.c | |
| parent | e6e482054de77f3fe5d65344da86065373cf5f23 (diff) | |
Fix "-w" flag and fix optimization for skipping to match
Diffstat (limited to 'match.c')
| -rw-r--r-- | match.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -295,7 +295,7 @@ static pat_t *get_prerequisite(match_ctx_t *ctx, pat_t *pat) case BP_CHAIN: { auto chain = Match(p, BP_CHAIN); // If pattern is something like (|"foo"|), then use "foo" as the first thing to scan for - p = (chain->first->type == BP_WORD_BOUNDARY || chain->first->type == BP_START_OF_LINE) ? chain->second : chain->first; + p = chain->first->max_matchlen == 0 ? chain->second : chain->first; break; } case BP_MATCH: |
