Fix Windows dialog folder titles

Same fix as in cf946e32ba, which was not done for the folder implementation.
This commit is contained in:
Semphris authored and Sam Lantinga committed 2025-01-19 08:19:40 -08:00
1 parent 32965b4bf1
commit 43b54b3d72
1 file changed
+2 -2
+2 -2
View File
@@ -439,7 +439,7 @@ void windows_ShowFolderDialog(void *ptr)
title_len = 0;
}
int title_wlen = MultiByteToWideChar(CP_UTF8, 0, title, title_len, NULL, 0);
int title_wlen = MultiByteToWideChar(CP_UTF8, 0, title, -1, NULL, 0);
if (title_wlen < 0) {
title_wlen = 0;
@@ -452,7 +452,7 @@ void windows_ShowFolderDialog(void *ptr)
return;
}
MultiByteToWideChar(CP_UTF8, 0, title, title_len, title_w, title_wlen);
MultiByteToWideChar(CP_UTF8, 0, title, -1, title_w, title_wlen);
}
wchar_t buffer[MAX_PATH];