Fix drop path encoding on windows

This commit is contained in:
luboslenco
2025-03-21 11:45:31 +01:00
parent 2a3c5e26de
commit 0fa1236378
+1 -1
View File
@@ -664,7 +664,7 @@ void _drop_files(wchar_t *file_path, void *data) {
char buffer[1024];
#ifdef IRON_WINDOWS
WideCharToMultiByte(CP_UTF8, 0, file_path, wcslen(file_path), buffer, sizeof(buffer), NULL, NULL);
WideCharToMultiByte(CP_UTF8, 0, file_path, wcslen(file_path) + 1, buffer, sizeof(buffer), NULL, NULL);
#else
wcstombs(buffer, file_path, sizeof(buffer));
#endif