Fix code fragment with undefined behavior.
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 20 Apr 2009 11:44:15 +0000 (13:44 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 20 Apr 2009 11:44:15 +0000 (13:44 +0200)
dfa/bset.c

index ecb1c24..49d4212 100644 (file)
@@ -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 ('-');