From 7d8ca8b01d547d9129f6937804b47eb3daebdd07 Mon Sep 17 00:00:00 2001 From: "peterv%netscape.com" Date: Wed, 14 Nov 2001 13:47:49 +0000 Subject: [PATCH] Fix for bug 105452 (Annoying assert when outputing DOM to HTML source). r=cmanske, sr=kin. --- content/base/src/nsXMLContentSerializer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/base/src/nsXMLContentSerializer.cpp b/content/base/src/nsXMLContentSerializer.cpp index 4936597ffc61..4aa74604f9d8 100644 --- a/content/base/src/nsXMLContentSerializer.cpp +++ b/content/base/src/nsXMLContentSerializer.cpp @@ -106,8 +106,10 @@ nsXMLContentSerializer::AppendTextData(nsIDOMNode* aNode, PRInt32 length = ((aEndOffset == -1) ? frag->GetLength() : aEndOffset) - aStartOffset; if (length <= 0) { - NS_ASSERTION(0, "a start offset is beyond the end of the text fragment!"); - return NS_OK; // XXX Maybe this should be an error + NS_ASSERTION(aStartOffset == 0, + "a start offset is beyond the end of the text fragment!"); + return NS_OK; // XXX Zero is a legal value, maybe non-zero values should + // be an error. } if (frag->Is2b()) {