From 10c2787dcb07398b3a808efbac929f568f3d215a Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Mon, 29 Aug 2016 11:01:37 +0100 Subject: [PATCH] Initialise hook command widget correctly. We weren't explicitly zeroing the GUI widget for entering the hook command. --- gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui.cpp b/gui.cpp index 628b136..0fa11f4 100644 --- a/gui.cpp +++ b/gui.cpp @@ -354,7 +354,7 @@ static inline void set_hook_tab(int event_index, int action_index, bool changed) SetEnvironmentVariable(hook_name, cmd); } else { - GetEnvironmentVariable(hook_name, cmd, _countof(cmd)); + if (! GetEnvironmentVariable(hook_name, cmd, _countof(cmd))) cmd[0] = _T('\0'); SetDlgItemText(tablist[NSSM_TAB_HOOKS], IDC_HOOK, cmd); } } -- 2.7.4