Re: [Boost-bugs] [Boost C++ Libraries] #7784: Overlapping strings are not properly handled by string::algo::find_all

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7784: Overlapping strings are not properly handled by string::algo::find_all
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-12-20 09:59:00


#7784: Overlapping strings are not properly handled by string::algo::find_all
--------------------------------------+-------------------------------------
  Reporter: cedstrom@… | Owner: marshall
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: string_algo
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment (by anonymous):

 Patch which I believe fixes this:

 {{{
 Index: boost-trunk/boost/algorithm/string/find_iterator.hpp
 ===================================================================
 --- boost-trunk/boost/algorithm/string/find_iterator.hpp (revision
 82112)
 +++ boost-trunk/boost/algorithm/string/find_iterator.hpp (working
 copy)
 @@ -132,7 +132,10 @@
              // increment
              void increment()
              {
 - m_Match=this->do_find(m_Match.end(),m_End);
 + if(m_Match.begin() == m_Match.end())
 + m_Match=this->do_find(m_Match.end(),m_End);
 + else
 + m_Match=this->do_find(m_Match.begin()+1,m_End);
              }

              // comparison
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7784#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC