浏览代码

[hlc] Fix cli args handling with WINDOWS subsystem (#813)

__wargv is NULL when using WinMain. If we want it to be not NULL, we
need to use wWinMain.
tobil4sk 2 周之前
父节点
当前提交
b380e430d7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/hlc_main.c

+ 1 - 1
src/hlc_main.c

@@ -194,7 +194,7 @@ int main(int argc, char *argv[]) {
 }
 
 #if defined(HL_WIN_DESKTOP) && !defined(_CONSOLE)
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
+int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR lpCmdLine, int nCmdShow) {
 	return wmain(__argc, __wargv);
 }
 #elif defined(HL_XBS)