git://git.iain.cx/iain
/
nssm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
203bfae
)
Initialise hook command widget correctly.
author
Iain Patterson
<me@iain.cx>
Mon, 29 Aug 2016 10:01:37 +0000
(11:01 +0100)
committer
Iain Patterson
<me@iain.cx>
Mon, 29 Aug 2016 10:01:37 +0000
(11:01 +0100)
We weren't explicitly zeroing the GUI widget for entering the hook command.
gui.cpp
patch
|
blob
|
history
diff --git
a/gui.cpp
b/gui.cpp
index
628b136
..
0fa11f4
100644
(file)
--- 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);
\r
}
\r
else {
\r
-
GetEnvironmentVariable(hook_name, cmd, _countof(cmd)
);
\r
+
if (! GetEnvironmentVariable(hook_name, cmd, _countof(cmd))) cmd[0] = _T('\0'
);
\r
SetDlgItemText(tablist[NSSM_TAB_HOOKS], IDC_HOOK, cmd);
\r
}
\r
}
\r