diff -r 8d7ca1b320e2 -r 88bc21b19213 ui/winui/util.cpp --- a/ui/winui/util.cpp Thu Oct 19 21:19:19 2023 +0200 +++ b/ui/winui/util.cpp Fri Oct 20 16:34:33 2023 +0200 @@ -8,7 +8,10 @@ wchar_t* str2wstr(const char* str, int* newlen) { size_t len = strlen(str); + return str2wstr_len(str, len, newlen); +} +wchar_t* str2wstr_len(const char* str, size_t len, int* newlen) { wchar_t* wstr = (wchar_t*)calloc(len + 1, sizeof(wchar_t)); int wlen = MultiByteToWideChar( CP_UTF8,