diff -r feb7974cf4ec -r 2025a571895e lemon/bits/path_dump.h --- a/lemon/bits/path_dump.h Tue Aug 28 13:58:54 2007 +0000 +++ b/lemon/bits/path_dump.h Tue Aug 28 14:00:42 2007 +0000 @@ -54,7 +54,9 @@ RevEdgeIt() {} RevEdgeIt(Invalid) : path(0), current(INVALID) {} RevEdgeIt(const PredMapPath& _path) - : path(&_path), current(_path.target) {} + : path(&_path), current(_path.target) { + if (path->predMap[current] == INVALID) current = INVALID; + } operator const typename Graph::Edge() const { return path->predMap[current]; @@ -126,7 +128,10 @@ RevEdgeIt() {} RevEdgeIt(Invalid) : path(0), current(INVALID) {} RevEdgeIt(const PredMatrixMapPath& _path) - : path(&_path), current(_path.target) {} + : path(&_path), current(_path.target) { + if (path->predMatrixMap(path->source, current) == INVALID) + current = INVALID; + } operator const typename Graph::Edge() const { return path->predMatrixMap(path->source, current);