diff --git a/include/boost/algorithm/string/detail/finder.hpp b/include/boost/algorithm/string/detail/finder.hpp index 5229cde..7392b81 100644 --- a/include/boost/algorithm/string/detail/finder.hpp +++ b/include/boost/algorithm/string/detail/finder.hpp @@ -325,7 +325,7 @@ namespace boost { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; - if ( (End<=Begin) || (End < (Begin+m_N) ) ) + if ( (End<=Begin) || ( static_cast(End-Begin) < m_N ) ) return result_type( Begin, End ); return result_type(Begin,Begin+m_N); @@ -414,7 +414,7 @@ namespace boost { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; - if ( (End<=Begin) || (End < (Begin+m_N) ) ) + if ( (End<=Begin) || ( static_cast(End-Begin) < m_N ) ) return result_type( Begin, End ); return result_type( End-m_N, End );