diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2022-05-02 17:23:02 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2022-05-02 17:23:02 -0400 |
| commit | e071ac7b12260b4dcbc80f4c864706de29a6d3c9 (patch) | |
| tree | 3ba3cdf2b8420a8a3d786efdb92071969f61a249 /match.c | |
| parent | 892708a651bd6194e3fad242bcf35f0ad868c86e (diff) | |
Bugfix for left recursion
Diffstat (limited to 'match.c')
| -rw-r--r-- | match.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -667,7 +667,9 @@ static match_t *match(match_ctx_t *ctx, const char *str, pat_t *pat) while (1) { const char *prev = m->end; rec_op.args.leftrec.match = m; + ctx2.cache = &(cache_t){0}; match_t *m2 = match(&ctx2, str, ref); + cache_destroy(&ctx2); if (!m2) break; if (m2->end <= prev) { recycle_match(&m2); |
