# HG changeset patch
# User Alpar Juttner <alpar@cs.elte.hu>
# Date 1431616424 -7200
# Node ID f85ee41c84bc9a00773f074e5f65ceabe71398e2
# Parent  2f479109a71dc4518b178d4e783d68e9d6937b91
Bugfix in Vf2 - missing initialization (#597)

diff -r 2f479109a71d -r f85ee41c84bc lemon/vf2.h
--- a/lemon/vf2.h	Thu May 14 16:07:38 2015 +0200
+++ b/lemon/vf2.h	Thu May 14 17:13:44 2015 +0200
@@ -410,6 +410,8 @@
       _depth=0;
       setOrder();
       setRNew1tRInOut1t();
+      for(typename G1::NodeIt n(g1);n!=INVALID;++n)
+        m[n]=INVALID;
     }
 
     ///Returns the current mapping type
diff -r 2f479109a71d -r f85ee41c84bc test/vf2_test.cc
--- a/test/vf2_test.cc	Thu May 14 16:07:38 2015 +0200
+++ b/test/vf2_test.cc	Thu May 14 17:13:44 2015 +0200
@@ -352,7 +352,12 @@
   check(!checkIso(p10,c10),
         "P10 and C10 are not isomorphic.");
   check(checkIso(c10,c10),
-        "C10 and C10 are not isomorphic.");
+        "C10 and C10 are isomorphic.");
+
+  check(!vf2(p10,c10).iso().run(),
+        "P10 and C10 are not isomorphic.");
+  check(vf2(c10,c10).iso().run(),
+        "C10 and C10 are isomorphic.");
 
   check(!checkSub(c5,petersen,c5_col,petersen_col1),
         "There should exist a C5->Petersen mapping.");