From f099f504af5a7471edd7f1b1e508ec0c8b23f3ab Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 2 Nov 2017 16:46:09 +0100 Subject: osd: don't skip leading whitespace on the first line either Stupid libass. --- sub/osd_libass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sub/osd_libass.c') diff --git a/sub/osd_libass.c b/sub/osd_libass.c index ce1a3cddb4..28a16d6204 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -209,7 +209,7 @@ static void mangle_ass(bstr *dst, const char *in) if (escape_ass && *in == '{') bstr_xappend(NULL, dst, bstr0("\\")); // Libass will strip leading whitespace - if (in[0] == ' ' && in != start && in[-1] == '\n') { + if (in[0] == ' ' && (in == start || in[-1] == '\n')) { bstr_xappend(NULL, dst, bstr0("\\h")); in += 1; continue; -- cgit v1.2.3