From ef65262920f4c3b87a715b2f01ddf8129695e75f Mon Sep 17 00:00:00 2001 From: cantabile Date: Tue, 24 Jul 2012 02:39:32 +0000 Subject: [PATCH] SRTSubtitleFormat: don't mix line endings in non-Windows Originally committed to SVN as r6941. --- aegisub/src/subtitle_format_srt.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aegisub/src/subtitle_format_srt.cpp b/aegisub/src/subtitle_format_srt.cpp index 6ec65b457..a1c747903 100644 --- a/aegisub/src/subtitle_format_srt.cpp +++ b/aegisub/src/subtitle_format_srt.cpp @@ -505,7 +505,11 @@ void SRTSubtitleFormat::WriteFile(const AssFile *src, wxString const& filename, StripComments(copy.Line); RecombineOverlaps(copy.Line); MergeIdentical(copy.Line); +#ifdef _WIN32 ConvertNewlines(copy.Line, "\r\n", false); +#else + ConvertNewlines(copy.Line, "\n", false); +#endif // Write lines int i=1;