From d2e9e47bb49e173b83d1f43eeeca6efe0c2ec96d Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Sat, 25 Feb 2017 16:59:51 +0100 Subject: [PATCH] graphics-hook: Account for sizeof(wchar_t) in len --- plugins/win-capture/graphics-hook/graphics-hook.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/win-capture/graphics-hook/graphics-hook.c b/plugins/win-capture/graphics-hook/graphics-hook.c index fb506ddea..c3f43ebe3 100644 --- a/plugins/win-capture/graphics-hook/graphics-hook.c +++ b/plugins/win-capture/graphics-hook/graphics-hook.c @@ -235,8 +235,8 @@ static inline bool init_hook(HANDLE thread_handle) { wait_for_dll_main_finish(thread_handle); - _snwprintf(keepalive_name, sizeof(keepalive_name), L"%s%lu", - WINDOW_HOOK_KEEPALIVE, GetCurrentProcessId()); + _snwprintf(keepalive_name, sizeof(keepalive_name) / sizeof(wchar_t), + L"%s%lu", WINDOW_HOOK_KEEPALIVE, GetCurrentProcessId()); init_pipe();