summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2013-10-31 20:20:30 -0700
committerJim Meyering <meyering@fb.com>2013-11-02 12:16:26 -0700
commit7f96aa773b5967bbb3c8476f8614fd04b3fc1362 (patch)
treecd4a1becc4013e336ad4f57b813268e93f5fde3e /src
parentecb7452cd420b7a2e0cca186e0d6666261c16c46 (diff)
downloadgrep-7f96aa773b5967bbb3c8476f8614fd04b3fc1362.tar.gz
grep: fix regression involving \s and \S
Commit v2.14-40-g01ec90b made \s and \S work with multi-byte characters, but it made it so any use like \s*, \s+, \s?, \s{3} would malfunction in a multi-byte locale. * src/dfa.c (lex): Also reset laststart. * tests/backslash-s-and-repetition-operators: New file. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. * THANKS: Update. Reported by Mirraz Mirraz in http://bugs.gnu.org/15773.
Diffstat (limited to 'src')
-rw-r--r--src/dfa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dfa.c b/src/dfa.c
index de6c6717..92c410e2 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1473,6 +1473,7 @@ lex (void)
POP_LEX_STATE ();
+ laststart = 0;
return lasttok;
case 'w':