Sorry, I failed in attachment of the patch. I re-send it.
>From 1bf0ddb362595652fd40008eb4da50f17e1f1358 Mon Sep 17 00:00:00 2001
From: Norihiro Tanaka <[email protected]>
Date: Wed, 26 Mar 2014 00:41:48 +0900
Subject: grep: proceed the `beg' pointer after exact matched in KWSet
* src/dfasearch.c (EGexecute): proceed with the pointer to check
multibyte characters at exact match.
---
src/dfasearch.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/dfasearch.c b/src/dfasearch.c
index 0b56960..fa77976 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -247,6 +247,7 @@ EGexecute (char const *buf, size_t size, size_t *match_size,
|| !is_mb_middle (&mb_start, match, buflim,
kwsm.size[0]))
goto success;
+ beg = mb_start;
}
if (dfaexec (dfa, beg, (char *) end, 0, NULL, &backref) == NULL)
continue;
--
1.9.1