summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-24 22:38:45 +0200
committerwm4 <wm4@nowhere>2012-10-24 22:38:45 +0200
commit0e81d62c53a205ce5a4a5b201c283a1f9aba7316 (patch)
tree9ce8f4b0444a765c6a5dce3cb84c528a0e4ca3df /sub
parentbcf447d7e82af814ccc07c852543be38e58d69c8 (diff)
parent60cbc9461b86b13c68cc9537bc9a124ddc07a399 (diff)
downloadmpv-0e81d62c53a205ce5a4a5b201c283a1f9aba7316.tar.bz2
mpv-0e81d62c53a205ce5a4a5b201c283a1f9aba7316.tar.xz
Merge branch 'master' into osd_changes
Conflicts: libvo/vo_xv.c
Diffstat (limited to 'sub')
-rw-r--r--sub/osd_libass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c
index 5f17f2fa6f..11173dad7a 100644
--- a/sub/osd_libass.c
+++ b/sub/osd_libass.c
@@ -125,7 +125,7 @@ static char *mangle_ass(const char *in)
char *res = talloc_strdup(NULL, "");
while (*in) {
// As used by osd_get_function_sym().
- if (in[0] == '\xFF') {
+ if (in[0] == '\xFF' && in[1]) {
res = talloc_strdup_append_buffer(res, ASS_USE_OSD_FONT);
res = append_utf8_buffer(res, OSD_CODEPOINTS + in[1]);
res = talloc_strdup_append_buffer(res, "{\\r}");
@@ -137,7 +137,7 @@ static char *mangle_ass(const char *in)
res = talloc_strndup_append_buffer(res, in, 1);
// Break ASS escapes with U+2060 WORD JOINER
if (*in == '\\')
- append_utf8_buffer(res, 0x2060);
+ res = append_utf8_buffer(res, 0x2060);
in++;
}
return res;