Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 0c2b8de

Browse files
committed
Bug 856374 - Check if output string is empty when serializing. r=smaug.
1 parent b019555 commit 0c2b8de

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

content/base/src/nsXMLContentSerializer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ nsXMLContentSerializer::AppendToStringWrapped(const nsASingleFragmentString& aSt
16851685
mMayIgnoreLineBreakSequence = false;
16861686

16871687
bool sequenceStartAfterAWhitespace = false;
1688-
if (pos < end) {
1688+
if (pos < end && !aOutputStr.IsEmpty()) {
16891689
nsAString::const_char_iterator end2;
16901690
aOutputStr.EndReading(end2);
16911691
--end2;

0 commit comments

Comments
 (0)