Bug 98711: Fix misuses of string.Right(). r=jfrancis, sr=jst

git-svn-id: svn://10.0.0.236/trunk@102854 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rjesup%wgate.com
2001-09-13 00:09:49 +00:00
parent fea7889357
commit b88ac2aaa0
5 changed files with 5 additions and 5 deletions

View File

@@ -1558,7 +1558,7 @@ nsresult nsHTMLEditor::CreateDOMFragmentFromPaste(nsIDOMNSRange *aNSRange,
PRInt32 err, sep;
sep = aInfoStr.FindChar((PRUnichar)',');
aInfoStr.Left(numstr1, sep);
aInfoStr.Right(numstr2, sep+1);
aInfoStr.Right(numstr2, aInfoStr.Length() - (sep+1));
*outRangeStartHint = numstr1.ToInteger(&err) + contextDepth;
*outRangeEndHint = numstr2.ToInteger(&err) + contextDepth;
}

View File

@@ -1558,7 +1558,7 @@ nsresult nsHTMLEditor::CreateDOMFragmentFromPaste(nsIDOMNSRange *aNSRange,
PRInt32 err, sep;
sep = aInfoStr.FindChar((PRUnichar)',');
aInfoStr.Left(numstr1, sep);
aInfoStr.Right(numstr2, sep+1);
aInfoStr.Right(numstr2, aInfoStr.Length() - (sep+1));
*outRangeStartHint = numstr1.ToInteger(&err) + contextDepth;
*outRangeEndHint = numstr2.ToInteger(&err) + contextDepth;
}

View File

@@ -676,7 +676,7 @@ nsNntpService::SetUpNntpUrlForPosting(nsINntpUrl *nntpUrl, const char *newsgroup
if (slashpos > 0 ) {
// theRest is "host/group"
theRest.Left(currentHost, slashpos);
theRest.Right(currentGroup, slashpos);
theRest.Right(currentGroup, theRest.Length() - slashpos);
}
else {
// str is "group"

View File

@@ -94,7 +94,7 @@ nsUserInfo::GetDomain(char * *aDomain)
if (atOffset != kNotFound)
{
nsCAutoString domainString;
tempString.Right(domainString, atOffset + 1);
tempString.Right(domainString, tempString.Length() - (atOffset + 1));
*aDomain = domainString.ToNewCString();
return NS_OK;
}

View File

@@ -94,7 +94,7 @@ nsUserInfo::GetDomain(char * *aDomain)
if (atOffset != kNotFound)
{
nsCAutoString domainString;
tempString.Right(domainString, atOffset + 1);
tempString.Right(domainString, tempString.Length() - (atOffset + 1));
*aDomain = domainString.ToNewCString();
return NS_OK;
}