Serious bugfix.
1.1 --- a/lemon/dfs.h Sat Aug 27 12:08:23 2005 +0000
1.2 +++ b/lemon/dfs.h Mon Aug 29 18:21:02 2005 +0000
1.3 @@ -536,14 +536,17 @@
1.4 _dist->set(m,_stack_head);
1.5 }
1.6 else {
1.7 - Node n;
1.8 - while(_stack_head>=0 &&
1.9 - (n=G->source(_stack[_stack_head]),
1.10 - ++_stack[_stack_head]==INVALID))
1.11 - {
1.12 - _processed->set(n,true);
1.13 - --_stack_head;
1.14 - }
1.15 + m=G->source(e);
1.16 + ++_stack[_stack_head];
1.17 + }
1.18 + //'m' is now the (original) source of the _stack[_stack_head]
1.19 + while(_stack_head>=0 && _stack[_stack_head]==INVALID) {
1.20 + _processed->set(m,true);
1.21 + --_stack_head;
1.22 + if(_stack_head>=0) {
1.23 + m=G->source(_stack[_stack_head]);
1.24 + ++_stack[_stack_head];
1.25 + }
1.26 }
1.27 return e;
1.28 }