
* src/function_loader.cc (join): Take care not to increment a past-the-end iterator. --- extatica/ChangeLog | 7 +++++++ extatica/src/function_loader.cc | 9 +++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/extatica/ChangeLog b/extatica/ChangeLog index 6e2abcc..698676e 100644 --- a/extatica/ChangeLog +++ b/extatica/ChangeLog @@ -1,3 +1,10 @@ +2010-11-03 Roland Levillain <roland@lrde.epita.fr> + + Fix the stream junction operation. + + * src/function_loader.cc (join): Take care not to increment a + past-the-end iterator. + 2010-11-02 Roland Levillain <roland@lrde.epita.fr> * config/boost.m4: Update to upstream version. diff --git a/extatica/src/function_loader.cc b/extatica/src/function_loader.cc index 9dbc138..4ace3b0 100644 --- a/extatica/src/function_loader.cc +++ b/extatica/src/function_loader.cc @@ -63,10 +63,11 @@ OStream& join(const InputIterator& begin, const InputIterator& end, InputIterator it = begin; if (it != end) - ostr << *it; - - for (++it; it != end; ++it) - ostr << elt << *it; + { + ostr << *it; + for (++it; it != end; ++it) + ostr << elt << *it; + } return ostr; } -- 1.5.6.5