mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
bugfix advancing UTF-8 length in UTF-16 string
This commit is contained in:
parent
dcdbc0bf9f
commit
8ddb074889
1 changed files with 2 additions and 2 deletions
|
|
@ -273,7 +273,7 @@ void windows_ShowFileDialog(void *ptr)
|
|||
SDL_strlcpy(chosen_file, chosen_folder, MAX_PATH);
|
||||
chosen_file[chosen_folder_size] = '\\';
|
||||
|
||||
file_ptr += SDL_strlen(chosen_folder) + 1;
|
||||
file_ptr += SDL_wcslen(file_ptr) + 1;
|
||||
|
||||
while (*file_ptr) {
|
||||
nfiles++;
|
||||
|
|
@ -308,7 +308,7 @@ void windows_ShowFileDialog(void *ptr)
|
|||
return;
|
||||
}
|
||||
|
||||
file_ptr += SDL_strlen(chosen_file) + 1 - diff;
|
||||
file_ptr += SDL_wcslen(file_ptr) + 1;
|
||||
|
||||
chosen_files_list[nfiles - 1] = SDL_strdup(chosen_file);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue