Fixed bug 2536490 by fixing find function.
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@948 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
b9606b2f13
commit
7724ac7220
1 changed files with 3 additions and 2 deletions
|
@ -890,8 +890,9 @@ public:
|
||||||
|
|
||||||
size_type find (const value_type* s, size_type pos, size_type n) const
|
size_type find (const value_type* s, size_type pos, size_type n) const
|
||||||
{
|
{
|
||||||
// Mar 13 2007: Changed <= to < below (thanks to Jean-Francois Bastien)
|
if (n + pos > size())
|
||||||
for (; pos < size(); ++pos)
|
return npos;
|
||||||
|
for (; pos + n <= size(); ++pos)
|
||||||
{
|
{
|
||||||
if (traits_type::compare(data() + pos, s, n) == 0)
|
if (traits_type::compare(data() + pos, s, n) == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue