]> git.sesse.net Git - vlc/commitdiff
Fixed another bug in ToCharset I introduced.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 3 Nov 2010 22:49:43 +0000 (23:49 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 3 Nov 2010 22:49:43 +0000 (23:49 +0100)
Sorry for the noise, I won't touch it anymore...

src/text/unicode.c

index a8e58a52598ab02b679c0292659d71fd87b243c3..9745cf2ea7270761f6c2dbefdb95ed7ee17fbaeb 100644 (file)
@@ -440,7 +440,7 @@ void *ToCharset(const char *charset, const char *in, size_t *outsize)
 
         if (vlc_iconv (hd, &inp, &inb, &outp, &outb) != (size_t)(-1))
         {
-            *outsize = outlen - outb;
+            *outsize = outlen - mul - outb;
             outb += mul;
             inb = 1; /* append nul terminator if possible */
             if (vlc_iconv (hd, &inp, &inb, &outp, &outb) != (size_t)(-1))