Skip to content

Commit 43b54b3

Browse files
Semphrisslouken
Semphris
authored andcommittedJan 19, 2025·
Fix Windows dialog folder titles
Same fix as in cf946e3, which was not done for the folder implementation.
1 parent 32965b4 commit 43b54b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/dialog/windows/SDL_windowsdialog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ void windows_ShowFolderDialog(void *ptr)
439439
title_len = 0;
440440
}
441441

442-
int title_wlen = MultiByteToWideChar(CP_UTF8, 0, title, title_len, NULL, 0);
442+
int title_wlen = MultiByteToWideChar(CP_UTF8, 0, title, -1, NULL, 0);
443443

444444
if (title_wlen < 0) {
445445
title_wlen = 0;
@@ -452,7 +452,7 @@ void windows_ShowFolderDialog(void *ptr)
452452
return;
453453
}
454454

455-
MultiByteToWideChar(CP_UTF8, 0, title, title_len, title_w, title_wlen);
455+
MultiByteToWideChar(CP_UTF8, 0, title, -1, title_w, title_wlen);
456456
}
457457

458458
wchar_t buffer[MAX_PATH];

0 commit comments

Comments
 (0)
Please sign in to comment.