changeset 22796:903554be7bfc

(main): Explicitly check result of message box for OK.
author Geoff Voelker <voelker@cs.washington.edu>
date Tue, 21 Jul 1998 04:00:21 +0000
parents b8d669900d55
children 2311a799a981
files nt/addpm.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/nt/addpm.c	Tue Jul 21 01:42:40 1998 +0000
+++ b/nt/addpm.c	Tue Jul 21 04:00:21 1998 +0000
@@ -152,9 +152,12 @@
 
       /* 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);