diff options
author | wm4 <wm4@nowhere> | 2015-09-21 18:29:57 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-21 18:29:57 +0200 |
commit | 7850523e7ba0255fdbc9197ed0eb172df872219e (patch) | |
tree | 117d70dd5c0c39719ef0f15aa9d0b71f99539583 | |
parent | 28fc8a25d1ef45166160c857bf60aff3eee6e37b (diff) | |
download | libass-no-iconv.tar.bz2 libass-no-iconv.tar.xz |
don't rely on ass_utf8_put_char to 0-terminateno-iconv
There was no problem with it, but the new code is probably more
intuitive.
-rw-r--r-- | libass/ass_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libass/ass_utils.c b/libass/ass_utils.c index c5f6e0e..29ee4c6 100644 --- a/libass/ass_utils.c +++ b/libass/ass_utils.c @@ -462,7 +462,6 @@ void ass_utf16be_to_utf8(char *dst, size_t dst_size, uint8_t *src, size_t src_si if (!dst_size) return; - dst[0] = '\0'; while (src < end) { uint32_t cp = ass_read_utf16be(&src, end - src); @@ -472,6 +471,8 @@ void ass_utf16be_to_utf8(char *dst, size_t dst_size, uint8_t *src, size_t src_si dst += s; dst_size -= s; } + + dst[0] = '\0'; } /** |