# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1285099984 -7200
# Node ID 0f1b10ef79b78aad6bfc4c6ef34e1357591957cf
# Parent bb871cb8ac0664d5db95721a1d678d604762a3c2
Bug fix in Dfs::start(s,t) (#392)
diff --git a/lemon/dfs.h b/lemon/dfs.h
a
|
b
|
|
558 | 558 | ///added with addSource() before using this function. |
559 | 559 | void start(Node t) |
560 | 560 | { |
561 | | while ( !emptyQueue() && G->target(_stack[_stack_head])!=t ) |
| 561 | while ( !emptyQueue() && !(*_reached)[t] ) |
562 | 562 | processNextArc(); |
563 | 563 | } |
564 | 564 | |
… |
… |
|
1511 | 1511 | /// \pre init() must be called and a root node should be added |
1512 | 1512 | /// with addSource() before using this function. |
1513 | 1513 | void start(Node t) { |
1514 | | while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t ) |
| 1514 | while ( !emptyQueue() && !(*_reached)[t] ) |
1515 | 1515 | processNextArc(); |
1516 | 1516 | } |
1517 | 1517 | |