# HG changeset patch # User deba # Date 1197885266 0 # Node ID faaa54ec452044b0d5b4be316a0ab723c8237ab7 # Parent e67ec65747faf10587a55a29838ec5159d8db6b0 Bug fix diff -r e67ec65747fa -r faaa54ec4520 lemon/unionfind.h --- a/lemon/unionfind.h Wed Dec 12 13:35:55 2007 +0000 +++ b/lemon/unionfind.h Mon Dec 17 09:54:26 2007 +0000 @@ -692,6 +692,9 @@ int cdx = newClass(); classes[cdx].prev = -1; classes[cdx].next = firstClass; + if (firstClass != -1) { + classes[firstClass].prev = cdx; + } firstClass = cdx; int idx = newItem();