Fix for bug #91378: "Find" doesnt find in some cases

Prevent FindInString() from skipping over current char
when eating additional whitespace.

r=brade@netscape.com  rs=blake@telocity.com
This commit is contained in:
kin%netscape.com 2001-07-20 14:39:07 +00:00
parent 2d3c9d9b01
commit fec513fa55

View File

@ -425,7 +425,7 @@ static PRInt32 FindInString(const nsString &searchStr, const nsString &patternSt
if (inWhitespace && !nsCRT::IsAsciiSpace(*p))
{
// leaving p whitespace. Eat up addition whitespace in s
while (t < searchEnd - 1 && nsCRT::IsAsciiSpace(*(t + 1)))
while (t < searchEnd - 1 && nsCRT::IsAsciiSpace(*t))
t ++;
inWhitespace = PR_FALSE;