diff --git a/include/boost/algorithm/string/detail/replace_storage.hpp b/include/boost/algorithm/string/detail/replace_storage.hpp index 4d8f1e6..98bfa42 100644 --- a/include/boost/algorithm/string/detail/replace_storage.hpp +++ b/include/boost/algorithm/string/detail/replace_storage.hpp @@ -125,7 +125,7 @@ namespace boost { ForwardIteratorT SegmentEnd ) { - if(InsertIt!=SegmentEnd) + if(InsertIt!=SegmentBegin) { // Call replace to do the job replace( Input, InsertIt, SegmentBegin, Storage );