UTF-8 conversion was returning string without null termination (thank you @stephan-01010011, ref pr #168)

This commit is contained in:
ejurgensen 2015-06-06 14:22:24 +02:00
parent a9437acc1a
commit 6224fdb025

View File

@ -511,7 +511,7 @@ unicode_fixup_string(char *str, const char *fromcode)
return str; return str;
} }
ret = u8_conv_from_encoding(fromcode, iconveh_question_mark, str, len, NULL, NULL, &len); ret = u8_strconv_from_encoding(str, fromcode, iconveh_question_mark);
if (!ret) if (!ret)
{ {
DPRINTF(E_LOG, L_MISC, "Could not convert string '%s' to UTF-8: %s\n", str, strerror(errno)); DPRINTF(E_LOG, L_MISC, "Could not convert string '%s' to UTF-8: %s\n", str, strerror(errno));