소스 검색

Fix drop path encoding on windows

luboslenco 6 달 전
부모
커밋
a65e7d82cb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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