diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-08-01 22:53:51 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-08-01 22:53:51 +0300 |
commit | 9698fd1ebff2bc3f76efbf498c28ce21aa515b7e (patch) | |
tree | 82d4d368ede5133d2eff3c7d535274c1f7eddccf /re.c | |
parent | de23ab7bfbea6ee03ef7386c6c203a4b2b7b7116 (diff) | |
parent | 385636c3da7f36ae020eeb7098485923168ccf4b (diff) | |
download | egawk-9698fd1ebff2bc3f76efbf498c28ce21aa515b7e.tar.gz egawk-9698fd1ebff2bc3f76efbf498c28ce21aa515b7e.tar.bz2 egawk-9698fd1ebff2bc3f76efbf498c28ce21aa515b7e.zip |
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); |