diff -r 8b4d25be4f7a -r f6741cfab647 lemon/dfs.h --- a/lemon/dfs.h Sat Aug 27 12:08:23 2005 +0000 +++ b/lemon/dfs.h Mon Aug 29 18:21:02 2005 +0000 @@ -536,14 +536,17 @@ _dist->set(m,_stack_head); } else { - Node n; - while(_stack_head>=0 && - (n=G->source(_stack[_stack_head]), - ++_stack[_stack_head]==INVALID)) - { - _processed->set(n,true); - --_stack_head; - } + m=G->source(e); + ++_stack[_stack_head]; + } + //'m' is now the (original) source of the _stack[_stack_head] + while(_stack_head>=0 && _stack[_stack_head]==INVALID) { + _processed->set(m,true); + --_stack_head; + if(_stack_head>=0) { + m=G->source(_stack[_stack_head]); + ++_stack[_stack_head]; + } } return e; }