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

This commit is contained in:
tbogard@aol.net
2000-03-23 04:13:49 +00:00
parent 99208d8bd6
commit 526c80d9e6
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 '>;
}