aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-08-01 22:54:59 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-08-01 22:54:59 +0300
commitb647466e12da8797dae420889b077f7d60531c58 (patch)
treea6f85621c1f597dc4b9361705a88990dc40e2093 /re.c
parentadb5491f2c9f49bf3d0e57f52c55bcaa4221e36e (diff)
parent9698fd1ebff2bc3f76efbf498c28ce21aa515b7e (diff)
downloadegawk-b647466e12da8797dae420889b077f7d60531c58.tar.gz
egawk-b647466e12da8797dae420889b077f7d60531c58.tar.bz2
egawk-b647466e12da8797dae420889b077f7d60531c58.zip
Merge branch 'master' into feature/nocopy
Diffstat (limited to 're.c')
-rw-r--r--re.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/re.c b/re.c
index 67ff682f..d92560d0 100644
--- a/re.c
+++ b/re.c
@@ -266,17 +266,17 @@ research(Regexp *rp, char *str, int start,
rp->pat.not_bol = 1;
/*
- * Always do dfa search if can; if it fails, then even if
- * need_start is true, we won't bother with the regex search.
+ * Always do dfa search if can; if it fails, we won't bother
+ * with the regex search.
*
* The dfa matcher doesn't have a no_bol flag, so don't bother
* trying it in that case.
*
- * 7/2008: Skip the dfa matcher if need_start. The dfa matcher
- * has bugs in certain multibyte cases and it's too difficult
- * to try to special case things.
+ * 7/2016: The dfa matcher can't handle a case where searching
+ * starts in the middle of a string, so don't bother trying it
+ * in that case.
*/
- if (rp->dfa && ! no_bol && ! need_start) {
+ if (rp->dfa && ! no_bol && start == 0) {
char save;
size_t count = 0;
struct dfa *superset = dfasuperset(rp->dfareg);