diff --git a/libass/ass_render.c b/libass/ass_render.c index 4532cab971..a757c2d4da 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1385,6 +1385,11 @@ static void wrap_lines_smart(int max_text_width) if (cur->symbol == ' ') last_space = i; + + // make sure the hard linebreak is not forgotten when + // there was a new soft linebreak just inserted + if (cur->symbol == '\n' && break_type == 1) + i--; } #define DIFF(x,y) (((x) < (y)) ? (y - x) : (x - y)) exit = 0;