Fix XPCOM_BREAK_ON_LOAD by restoring pre-string-branch Find() behavior when starting index is negative. Bug 243429, r+sr=darin

git-svn-id: svn://10.0.0.236/trunk@156313 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2004-05-12 19:26:30 +00:00
parent 7dd530076e
commit 653917c869

View File

@@ -905,7 +905,11 @@ Find_ComputeSearchRange( PRUint32 bigLen, PRUint32 littleLen, PRInt32& offset, P
{
// |count| specifies how many iterations to make from |offset|
if (offset < 0 || PRUint32(offset) > bigLen)
if (offset < 0)
{
offset = 0;
}
else if (PRUint32(offset) > bigLen)
{
count = 0;
return;