From d49faf82fb3df4f7f08c498db7e845174d6834a7 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 1 Jun 2016 17:40:01 -0400 Subject: [PATCH] ttconv: Also replace carriage return with spaces. Multi-line strings will cause issues in comments since the secondary lines will not be comments. This replacement is already done for newline characters (\n), but not carriage return (\r) which is prevalent on Windows. --- extern/ttconv/ttutil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/ttconv/ttutil.cpp b/extern/ttconv/ttutil.cpp index 52c3c8bf75c5..13aa170e0f2f 100644 --- a/extern/ttconv/ttutil.cpp +++ b/extern/ttconv/ttutil.cpp @@ -76,7 +76,7 @@ void TTStreamWriter::putline(const char *a) void replace_newlines_with_spaces(char *a) { char* i = a; while (*i != 0) { - if (*i == '\n') + if (*i == '\r' || *i == '\n') *i = ' '; i++; }