diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-09-23 17:50:16 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-09-23 17:50:16 -0700 |
| commit | 6ab22ad6a90b96f159a0d78499a49fd62989cb15 (patch) | |
| tree | d669a7d03e50d8a4666a024522c3081a98733079 | |
| parent | 1727d9b75c93051c3f46d3154256c8f3a78911a6 (diff) | |
Bugfix
| -rw-r--r-- | match.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -270,7 +270,7 @@ static match_t *_next_match(def_t *defs, cache_t *cache, file_t *f, const char * else if (upper) str = upper; else if (lower) str = lower; } else { - char *found = memmem(str, (size_t)(str - f->end), first->args.string, first->min_matchlen); + char *found = memmem(str, (size_t)(f->end - str), first->args.string, first->min_matchlen); str = found ? found : f->end; } } |
