diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2022-05-05 00:45:57 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2022-05-05 00:45:57 -0400 |
| commit | 52d022fc2f43ba148fd910dbde053d3c93da01d1 (patch) | |
| tree | 3969c06d926fb119ae1423205b23303e8e059fe0 | |
| parent | 3944a36f14662dacdd3689224f031e48ae60ea0a (diff) | |
Fix for source code ranges of suffix patterns
| -rw-r--r-- | pattern.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -566,6 +566,7 @@ maybe_pat_t bp_stringpattern(const char *str, const char *end) // static pat_t *bp_simplepattern(const char *str, const char *end) { + const char *start = str; pat_t *pat = _bp_simplepattern(str, end, false); if (pat == NULL) return pat; str = pat->end; @@ -584,7 +585,7 @@ static pat_t *bp_simplepattern(const char *str, const char *end) if (!second) parse_err(str, str, "There should be a valid pattern here"); - pat = new_pat(type, str, second->end, first->min_matchlen, first->max_matchlen); + pat = new_pat(type, start, second->end, first->min_matchlen, first->max_matchlen); pat->args.multiple.first = first; pat->args.multiple.second = second; str = pat->end; |
