mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-04-24 03:46:03 +08:00
Don't use the cmd paramter passed by WinMain.
It doesn't include the argv[0], 💩.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user