After search potential match at initial state, a current state may be
updated. So we must set 0 to previous state.
From 07dd685db6799a2771f1e8937dfaa5bc22721ee2 Mon Sep 17 00:00:00 2001
From: Norihiro Tanaka <[email protected]>
Date: Mon, 6 Oct 2014 21:22:33 +0900
Subject: [PATCH] dfa: after search potential match at initial state, set 0 to
previous state
* src/dfa.c (dfaexec_main): After search potential match at initial
state, set 0 to previous state.
---
src/dfa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/dfa.c b/src/dfa.c
index 7cbe247..b2da38b 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3376,6 +3376,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end,
{
while (t[*p] == 0)
p++;
+ s1 = 0;
s = t[*p++];
}
--
2.1.1