foxygit / doom Log in
commit 55789cf12de42cc893bd903f84435ed90015dd4a
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Sun Oct 4 23:38:14 2009 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Sun Oct 4 23:38:14 2009 +0000

    Provide pointer to STARTUPINFO structure when calling CreateProcessW, to
    stop crash under normal Windows (not CE) when launching Doom from the
    setup tools (thanks Janizdreg).

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 1709
---
 setup/execute.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/setup/execute.c b/setup/execute.c
index 03a4f65c..ae23bf2e 100644
--- a/setup/execute.c
+++ b/setup/execute.c
@@ -232,6 +232,7 @@ static wchar_t *GetPaddedWideArg(const char *arg)

 static int ExecuteCommand(const char *program, const char *arg)
 {
+    STARTUPINFOW startup_info;
     PROCESS_INFORMATION proc_info;
     wchar_t *exe_path;
     wchar_t *warg;
@@ -245,8 +246,8 @@ static int ExecuteCommand(const char *program, const char *arg)
     memset(&proc_info, 0, sizeof(proc_info));

     if (!CreateProcessW(exe_path, warg,
-                        NULL, NULL, FALSE, 0, NULL, NULL, NULL,
-                        &proc_info))
+                        NULL, NULL, FALSE, 0, NULL, NULL,
+                        &startup_info, &proc_info))
     {
         result = -1;
     }