diff -r fdeb961110ac -r 30d7e673781f lemon/dfs.h --- a/lemon/dfs.h Tue Aug 30 14:55:11 2005 +0000 +++ b/lemon/dfs.h Tue Aug 30 20:50:58 2005 +0000 @@ -512,9 +512,14 @@ _pred->set(s,INVALID); // _predNode->set(u,INVALID); OutEdgeIt e(*G,s); - if(e!=INVALID) _stack[++_stack_head]=e; - else _processed->set(s,true); - _dist->set(s,_stack_head); + if(e!=INVALID) { + _stack[++_stack_head]=e; + _dist->set(s,_stack_head); + } + else { + _processed->set(s,true); + _dist->set(s,0); + } } }