mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 13:43:27 +01:00
fix
This commit is contained in:
parent
3f7e60eaf4
commit
ae7087e760
@ -63,7 +63,7 @@ uint8_t *wcs_to_char(wchar_t *string)
|
|||||||
size_t len = wcstombs(NULL, string, 0);
|
size_t len = wcstombs(NULL, string, 0);
|
||||||
|
|
||||||
if (len != (size_t) -1) {
|
if (len != (size_t) -1) {
|
||||||
ret = malloc(len+1);
|
ret = malloc(++len);
|
||||||
|
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
wcstombs(ret, string, len);
|
wcstombs(ret, string, len);
|
||||||
|
Loading…
Reference in New Issue
Block a user