summaryrefslogtreecommitdiffstats
path: root/osdep/subprocess-win.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-11-18 23:31:16 +0100
committerDudemanguy <random342@airmail.cc>2023-11-18 23:55:28 +0000
commitd30432ea31523a64b900b9b3086636dc0317dbba (patch)
treed0ff87628494605057e08bf050a146140e5c8883 /osdep/subprocess-win.c
parent4449f38c17766a4645fda12dc0f56a79f0ae2bce (diff)
downloadmpv-d30432ea31523a64b900b9b3086636dc0317dbba.tar.bz2
mpv-d30432ea31523a64b900b9b3086636dc0317dbba.tar.xz
win32: don't jump over variable init with goto
Those variables are accessed after jump.
Diffstat (limited to 'osdep/subprocess-win.c')
-rw-r--r--osdep/subprocess-win.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/osdep/subprocess-win.c b/osdep/subprocess-win.c
index bb3527eaa6..5413b24bc4 100644
--- a/osdep/subprocess-win.c
+++ b/osdep/subprocess-win.c
@@ -253,6 +253,8 @@ void mp_subprocess2(struct mp_subprocess_opts *opts,
},
};
+ PROCESS_INFORMATION pi = {0};
+
for (int n = 0; n < opts->num_fds; n++) {
if (opts->fds[n].fd >= crt_fd_max) {
// Target FD is too big to fit in the CRT FD array
@@ -396,7 +398,6 @@ void mp_subprocess2(struct mp_subprocess_opts *opts,
}
DWORD flags = CREATE_UNICODE_ENVIRONMENT | EXTENDED_STARTUPINFO_PRESENT;
- PROCESS_INFORMATION pi = {0};
// Specify which handles are inherited by the subprocess. If this isn't
// specified, the subprocess inherits all inheritable handles, which could