diff options
| author | Eli Zaretskii | 2022-10-30 14:45:18 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2022-10-30 14:45:18 +0200 |
| commit | cb8918d7cc028988bad79b66cbf577f2f37413e1 (patch) | |
| tree | 72962469d1383a352aa10180987bb4a9a93d3e76 | |
| parent | 0922e755d219eb411c5c1ba42140790538aa3b0d (diff) | |
| download | emacs-cb8918d7cc028988bad79b66cbf577f2f37413e1.tar.gz emacs-cb8918d7cc028988bad79b66cbf577f2f37413e1.zip | |
; Fix unclean code in w32fns.c
* src/w32fns.c (setup_w32_kbdhook): Fix a typo and check errors
from the call to StringFromGUID2. Reported by Juanma Barranquero
<lekktu@gmail.com>.
| -rw-r--r-- | src/w32fns.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 5f652ae9e46..93b7f80f268 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -2734,8 +2734,7 @@ setup_w32_kbdhook (void) | |||
| 2734 | int i; | 2734 | int i; |
| 2735 | 2735 | ||
| 2736 | CoCreateGuid (&guid); | 2736 | CoCreateGuid (&guid); |
| 2737 | StringFromGUID2 (&guid, newTitle, 64); | 2737 | if (oldTitle != NULL && StringFromGUID2 (&guid, newTitle, 64)) |
| 2738 | if (newTitle != NULL) | ||
| 2739 | { | 2738 | { |
| 2740 | GetConsoleTitleW (oldTitle, 1024); | 2739 | GetConsoleTitleW (oldTitle, 1024); |
| 2741 | SetConsoleTitleW (newTitle); | 2740 | SetConsoleTitleW (newTitle); |