mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-13 01:13:02 +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);
|
||||
|
||||
if (len != (size_t) -1) {
|
||||
ret = malloc(len+1);
|
||||
ret = malloc(++len);
|
||||
|
||||
if (ret != NULL)
|
||||
wcstombs(ret, string, len);
|
||||
|
Loading…
Reference in New Issue
Block a user