Author: Alastair McKinstry <mckinstry@debian.org>
Description: Fix for bug: incorrect result given for <no> selected by ESC pressed in whiptail
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=#665784
Last-Updated: 2012-05-16
Forwarded: no

Index: newt-0.52.14/dialogboxes.c
===================================================================
--- newt-0.52.14.orig/dialogboxes.c	2012-05-16 12:15:50.000000000 +0100
+++ newt-0.52.14/dialogboxes.c	2012-05-16 12:16:29.000000000 +0100
@@ -568,7 +568,7 @@
 
 	answer = newtFormGetCurrent(form);
 
-	if (answer == no)
+	if ((rc == DLG_OKAY) && (answer == no))
 	    return DLG_CANCEL;
     }
     else {
