From: Geoff Voelker Date: Tue, 21 Jul 1998 04:00:21 +0000 (+0000) Subject: (main): Explicitly check result of message box for OK. X-Git-Tag: emacs-20.3~283 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59ee44271effbeca3f094a6bea50455e6c8214dc;p=emacs.git (main): Explicitly check result of message box for OK. --- 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);