]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
ng_violet: fix non-determinism in deanchorIfNeeded
authorJustin Viiret <justin.viiret@intel.com>
Wed, 27 Jul 2016 00:23:42 +0000 (10:23 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 10 Aug 2016 05:07:45 +0000 (15:07 +1000)
src/nfagraph/ng_violet.cpp

index 8843196f294d9f6d7bbbb07a7f94dd910430240b..27f84e99b9e61c09e067db48c42aa6e0d8fced46 100644 (file)
@@ -1333,7 +1333,10 @@ bool deanchorIfNeeded(NGHolder &g) {
 
         if (succ_v == succ_g) {
             DEBUG_PRINTF("found ^.*\n");
-            for (auto succ : succ_g) {
+            for (auto succ : adjacent_vertices_range(g.start, g)) {
+                if (succ == g.startDs) {
+                    continue;
+                }
                 add_edge(g.startDs, succ, g);
             }
             clear_vertex(v, g);