bug 204615: Editor hangs when pasting a list fragment. r=brade sr=dveditz

git-svn-id: svn://10.0.0.236/trunk@167746 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2005-01-14 21:49:16 +00:00
parent 0dba9077d7
commit dd20b59fcf

View File

@@ -2816,14 +2816,14 @@ nsHTMLEditor::ReplaceOrphanedStructure(PRBool aEnd,
nsIDOMNode* nsHTMLEditor::GetArrayEndpoint(PRBool aEnd,
nsCOMArray<nsIDOMNode>& aNodeArray)
{
PRInt32 listCount = aNodeArray.Count();
if (listCount <= 0)
return nsnull;
if (aEnd)
{
PRInt32 listCount = aNodeArray.Count();
if (listCount <= 0) return nsnull;
else return aNodeArray[listCount-1];
}
else
{
return aNodeArray[0];
return aNodeArray[listCount-1];
}
return aNodeArray[0];
}