diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-08-01 15:16:25 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-08-01 15:16:25 -0400 |
commit | 265bcc19d0ee3c8bfde5d91258345c864810e995 (patch) | |
tree | abb3af1a573cd6e87a7f76026eec57960ec522c7 /re.c | |
parent | 8518cb47f8315ea04290278e47cd44036edeaf35 (diff) | |
parent | 1b70e3c2fe5d26e5f3cc3cb74e74e91ee038ea70 (diff) | |
download | egawk-265bcc19d0ee3c8bfde5d91258345c864810e995.tar.gz egawk-265bcc19d0ee3c8bfde5d91258345c864810e995.tar.bz2 egawk-265bcc19d0ee3c8bfde5d91258345c864810e995.zip |
Merge branch 'gawk-4.1-stable' of ssh://git.sv.gnu.org/srv/git/gawk into 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); |