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:
rich_sposato 2009-01-26 01:55:50 +00:00
parent b9606b2f13
commit 7724ac7220

View file

@ -890,8 +890,9 @@ public:
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)
for (; pos < size(); ++pos)
if (n + pos > size())
return npos;
for (; pos + n <= size(); ++pos)
{
if (traits_type::compare(data() + pos, s, n) == 0)
{