diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-05-22 13:23:10 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-05-22 13:23:10 -0700 |
| commit | 9c8baf44343fc63478e430dbfa0f3bd744b05242 (patch) | |
| tree | 4ea91a5e8868d7bdd1d59efeb3cdf6548f3f0899 /match.c | |
| parent | cd719c14773325239fde36a2c34b4954ee6da8e9 (diff) | |
Fixes for replacements with or without patterns/replacement strings
Diffstat (limited to 'match.c')
| -rw-r--r-- | match.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -466,7 +466,7 @@ static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, bool return new_match(pat, start, &str[dents], NULL); } case BP_ERROR: { - match_t *p = match(defs, f, str, pat->args.pat, ignorecase); + match_t *p = pat->args.pat ? match(defs, f, str, pat->args.pat, ignorecase) : NULL; return p ? new_match(pat, str, p->end, p) : NULL; } default: { |
