From a5bc2fdb44a7960d338a09f46e8da3107a5dac68 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 31 Aug 2013 15:42:41 +0800 Subject: [PATCH] Don't use the cmd paramter passed by WinMain. It doesn't include the argv[0], :shit:. --- app/atom_main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/atom_main.cc b/app/atom_main.cc index 618e54b2e6d4..e868a63a6d7d 100644 --- a/app/atom_main.cc +++ b/app/atom_main.cc @@ -21,7 +21,7 @@ int Start(int argc, char *argv[]); int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { int argc = 0; - wchar_t** wargv = ::CommandLineToArgvW(cmd, &argc); + wchar_t** wargv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); if (argc > 1 && wcscmp(wargv[1], L"--atom-child_process-fork") == 0) { // Convert argv to to UTF8 char** argv = new char*[argc];