Fix bug in strconv, take care about the end of string NULL character.
This commit is contained in:
parent
c3ded11773
commit
6c7c54af93
@ -60,10 +60,10 @@ int strconv(const char *str, const char *icharset, const char *ocharset,
|
||||
iconv_close(conv);
|
||||
return ISO_CHARSET_CONV_ERROR;
|
||||
}
|
||||
iconv_close(conv);
|
||||
*ret = '\0';
|
||||
iconv_close(conv);
|
||||
|
||||
*output = realloc(out, ret - out);
|
||||
*output = realloc(out, ret - out + 1);
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user