diff options
-rw-r--r-- | src/input_win.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/input_win.c b/src/input_win.c index 87ceb7f1..7dddeba2 100644 --- a/src/input_win.c +++ b/src/input_win.c @@ -188,10 +188,8 @@ inp_get_char(char *input, int *size) // otherwise just append } else { - mbstate_t state; - memset(&state, '\0', sizeof (state)); - char bytes[5]; - size_t utf_len = wcrtomb(bytes, ch, &state); + char bytes[MB_CUR_MAX]; + size_t utf_len = wcrtomb(bytes, ch, NULL); int i; for (i = 0 ; i < utf_len; i++) { input[(*size)++] = bytes[i]; |