From 7772a601a6d2305397f162be3d1ff54e9ca98a93 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 20 Apr 2009 13:44:15 +0200 Subject: [PATCH] Fix code fragment with undefined behavior. --- dfa/bset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dfa/bset.c b/dfa/bset.c index ecb1c24..49d4212 100644 --- a/dfa/bset.c +++ b/dfa/bset.c @@ -258,7 +258,8 @@ void pr_charBSet (BSetHandle *sh, BSet src, void (*f) (int)) i1 = trav_BSet (sh, src, ++i); if (i1 == i) { - while ((i1=trav_BSet (sh, src, ++i)) == i) + ++i; + while ((i1=trav_BSet (sh, src, i)) == i) ; if (i != i0+2) f ('-'); -- 1.7.10.4