[Lemon-commits] [lemon_svn] alpar: r2180 - hugo/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:50:44 CET 2006
Author: alpar
Date: Tue Aug 30 15:48:40 2005
New Revision: 2180
Modified:
hugo/trunk/lemon/dfs.h
Log:
Bugfix: DFS crashed if the source did not have an outgoing edge.
Modified: hugo/trunk/lemon/dfs.h
==============================================================================
--- hugo/trunk/lemon/dfs.h (original)
+++ hugo/trunk/lemon/dfs.h Tue Aug 30 15:48:40 2005
@@ -511,7 +511,9 @@
_reached->set(s,true);
_pred->set(s,INVALID);
// _predNode->set(u,INVALID);
- _stack[++_stack_head]=OutEdgeIt(*G,s);
+ OutEdgeIt e(*G,s);
+ if(e!=INVALID) _stack[++_stack_head]=e;
+ else _processed->set(s,true);
_dist->set(s,_stack_head);
}
}
More information about the Lemon-commits
mailing list