From 59ee44271effbeca3f094a6bea50455e6c8214dc Mon Sep 17 00:00:00 2001 From: Geoff Voelker Date: Tue, 21 Jul 1998 04:00:21 +0000 Subject: [PATCH] (main): Explicitly check result of message box for OK. --- nt/addpm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nt/addpm.c b/nt/addpm.c index 2e536df03a7..a916c87e6bf 100644 --- a/nt/addpm.c +++ b/nt/addpm.c @@ -152,9 +152,12 @@ main (argc, argv) /* Tell user what we are going to do. */ { + int result; + char msg[ MAX_PATH ]; sprintf (msg, "Install Emacs at %s?\n", emacs_path); - if (!MessageBox (NULL, msg, "Install Emacs", MB_OKCANCEL | MB_ICONQUESTION)) + result = MessageBox (NULL, msg, "Install Emacs", MB_OKCANCEL | MB_ICONQUESTION); + if (result != IDOK) { fprintf (stderr, "Install cancelled\n"); exit (1); -- 2.39.2