From fec513fa557eff68e122c3dbec168a5f33d14b68 Mon Sep 17 00:00:00 2001 From: "kin%netscape.com" Date: Fri, 20 Jul 2001 14:39:07 +0000 Subject: [PATCH] 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 --- editor/txtsvc/src/nsFindAndReplace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/txtsvc/src/nsFindAndReplace.cpp b/editor/txtsvc/src/nsFindAndReplace.cpp index 33b2e69d899c..4cabdad4c9b8 100644 --- a/editor/txtsvc/src/nsFindAndReplace.cpp +++ b/editor/txtsvc/src/nsFindAndReplace.cpp @@ -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;