Don't try to Truncate when we fail to find the character. Actually, just do an assignment with the character location as the count size. This is actually a checkin for scc. r=travis

git-svn-id: svn://10.0.0.236/trunk@63821 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-03-23 04:13:49 +00:00
parent f7e967bab3
commit 59e0fc311d
2 changed files with 4 additions and 8 deletions

View File

@@ -351,10 +351,8 @@ nsresult CEndToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode)
nsresult result=aScanner.ReadUntil(mTextValue,kGreaterThan,PR_FALSE);
if(NS_OK==result){
PRInt32 theIndex=mTextValue.FindCharInSet(" \r\n\t\b",0);
nsAutoString buffer(mTextValue);
buffer.Truncate(theIndex);
nsAutoString buffer;
buffer.Assign(mTextValue, mTextValue.FindCharInSet(" \r\n\t\b",0));
mTypeID= nsHTMLTags::LookupTag(buffer);
result=aScanner.GetChar(aChar); //eat the closing '>;
}