From: Cheng Zhao Date: Sat, 31 Aug 2013 07:42:41 +0000 (+0800) Subject: Don't use the cmd paramter passed by WinMain. X-Git-Tag: v0.4.2~1^2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a5bc2fdb44a7960d338a09f46e8da3107a5dac68;p=electron.git Don't use the cmd paramter passed by WinMain. It doesn't include the argv[0], :shit:. --- diff --git a/app/atom_main.cc b/app/atom_main.cc index 618e54b2..e868a63a 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];