summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-11-02 16:46:09 +0100
committerwm4 <wm4@nowhere>2017-11-02 16:46:09 +0100
commitf099f504af5a7471edd7f1b1e508ec0c8b23f3ab (patch)
treedac2fee61edcc43df0a4d426732ad717a159b643
parentff17760c0009dc02458e5a4c6fc114d3b5d3408d (diff)
downloadmpv-f099f504af5a7471edd7f1b1e508ec0c8b23f3ab.tar.bz2
mpv-f099f504af5a7471edd7f1b1e508ec0c8b23f3ab.tar.xz
osd: don't skip leading whitespace on the first line either
Stupid libass.
-rw-r--r--sub/osd_libass.c2
1 files changed, 1 insertions, 1 deletions
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;