summaryrefslogtreecommitdiffstats
path: root/input/ipc-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 /input/ipc-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 'input/ipc-win.c')
-rw-r--r--input/ipc-win.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/input/ipc-win.c b/input/ipc-win.c
index 8db6705f3f..b0200eafc3 100644
--- a/input/ipc-win.c
+++ b/input/ipc-win.c
@@ -360,6 +360,7 @@ static MP_THREAD_VOID ipc_thread(void *p)
mp_thread_set_name("ipc/named-pipe");
MP_VERBOSE(arg, "Starting IPC master\n");
+ OVERLAPPED ol = {0};
SECURITY_ATTRIBUTES sa = {
.nLength = sizeof sa,
.lpSecurityDescriptor = create_restricted_sd(),
@@ -369,7 +370,7 @@ static MP_THREAD_VOID ipc_thread(void *p)
goto done;
}
- OVERLAPPED ol = { .hEvent = CreateEventW(NULL, TRUE, TRUE, NULL) };
+ ol = (OVERLAPPED){ .hEvent = CreateEventW(NULL, TRUE, TRUE, NULL) };
if (!ol.hEvent) {
MP_ERR(arg, "Couldn't create event");
goto done;