Index: Source/platform/text/LineEnding.cpp |
diff --git a/Source/platform/text/LineEnding.cpp b/Source/platform/text/LineEnding.cpp |
index eae0ebc55314ed0143d2b133f9b3a483a6591b68..05487b8d61c02fff0d4a6baad47b25a609254591 100644 |
--- a/Source/platform/text/LineEnding.cpp |
+++ b/Source/platform/text/LineEnding.cpp |
@@ -202,6 +202,8 @@ void normalizeToCROrLF(const CString& from, Vector<char>& result, bool toCR) |
CString normalizeLineEndingsToCRLF(const CString& from) |
{ |
+ if (!from.length()) |
+ return from; |
CString result; |
CStringBuffer buffer(result); |
internalNormalizeLineEndingsToCRLF(from, buffer); |