[augeas-devel] [PATCH 2/3] * src/fa.c (fa_as_regexp): fin only accepting state, no trans fin->fin

lutter at redhat.com lutter at redhat.com
Thu Jan 14 01:23:09 UTC 2010


From: David Lutterkort <lutter at redhat.com>

---
 src/fa.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/fa.c b/src/fa.c
index a929887..2949f9b 100644
--- a/src/fa.c
+++ b/src/fa.c
@@ -3824,10 +3824,11 @@ int fa_as_regexp(struct fa *fa, char **regexp, size_t *regexp_len) {
         r = convert_trans_to_re(s);
         if (r < 0)
             goto error;
-        if (s->accept) {
+        if (s->accept && s != fin) {
             r = add_new_re_trans(s, fin, ref(eps));
             if (r < 0)
                 goto error;
+            s->accept = 0;
         }
     }
 
-- 
1.6.5.2




More information about the augeas-devel mailing list