Explorar o código

Fix drop path encoding on windows

luboslenco hai 6 meses
pai
achega
a65e7d82cb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      armorcore/sources/iron.h

+ 1 - 1
armorcore/sources/iron.h

@@ -713,7 +713,7 @@ void _drop_files(wchar_t *file_path, void *data) {
 	char buffer[1024];
 
 #ifdef KINC_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