diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | io.c | 2 | ||||
-rw-r--r-- | re.c | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2020-10-11 Arnold D. Robbins <arnold@skeeve.com> + + * re.c (make_regexp): Add {} to characters that cause rp->maybe_long + to be true. + * io.c (rsrescan): Update comment for step 4. + 2020-09-21 Arnold D. Robbins <arnold@skeeve.com> * awk.h (enum redirect_flags): Add RED_NONE. @@ -3753,7 +3753,7 @@ again: * "abc" into the front of the next record. Ooops. * * The re->maybe_long member is true if the - * regex contains one of: + * ? |. This is a very + * regex contains one of: + * ? | { }. This is a very * simple heuristic, but in combination with the * "end of match within a few bytes of end of buffer" * check, should keep things reasonable. @@ -282,7 +282,7 @@ make_regexp(const char *s, size_t len, bool ignorecase, bool dfa, bool canfatal) } for (i = len - 1; i >= 0; i--) { - if (strchr("*+|?", buf[i]) != NULL) { + if (strchr("*+|?{}", buf[i]) != NULL) { rp->maybe_long = true; break; } |