aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--io.c2
-rw-r--r--re.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 84491dcc..f5bc0822 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/io.c b/io.c
index 1fb95873..2714398e 100644
--- a/io.c
+++ b/io.c
@@ -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.
diff --git a/re.c b/re.c
index a23e7f6c..fb28c563 100644
--- a/re.c
+++ b/re.c
@@ -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;
}