Fix launch after update bug

Build command line properly, must prepend executable name first since that gets populated into arg 0.
This commit is contained in:
Kawe Mazidjatari 2023-10-29 23:16:58 +01:00
parent a7277b47fc
commit c87ee1b81d

View File

@ -208,9 +208,12 @@ int main(int argc, char** argv)
// Initialize startup info struct.
startupInfo.cb = sizeof(STARTUPINFOA);
char commandLine[256];
V_snprintf(commandLine, sizeof(commandLine), "launcher.exe %s", "-launch");
BOOL createResult = CreateProcessA(
"launcher.exe", // lpApplicationName
(LPSTR)"-launch", // lpCommandLine
commandLine, // lpCommandLine
NULL, // lpProcessAttributes
NULL, // lpThreadAttributes
FALSE, // bInheritHandles