diff --git a/src/subtitle_format_ebu3264.cpp b/src/subtitle_format_ebu3264.cpp index a9594f26d..4c47fa54f 100644 --- a/src/subtitle_format_ebu3264.cpp +++ b/src/subtitle_format_ebu3264.cpp @@ -284,17 +284,17 @@ namespace text_rows.emplace_back(); cur_row = &text_rows.back(); cur_row->emplace_back("", underline, italic, true); + + start = i + 2; } else // if (substr == " " || substr == "\\n") { cur_row->back().text.append(" "); cur_row->emplace_back("", underline, italic, true); - } - if (text[i] == '\\') - start = ++i + 1; - else - start = i; + start = i + 1 + (text[i] == '\\'); + } + ++i; } // add the remaining text