]> granicus.if.org Git - nethack/commitdiff
debian #170531 - sign extension in gnome input
authorcohrs <cohrs>
Tue, 14 Oct 2003 07:07:40 +0000 (07:07 +0000)
committercohrs <cohrs>
Tue, 14 Oct 2003 07:07:40 +0000 (07:07 +0000)
Internals of gnome_yn_function should treat key inputs as 'int' until
returning them, to avoid truncating and not sign extending as needed on
platforms where char is unsigned.

doc/fixes34.3
win/gnome/gnbind.c

index a86b9d355852f4d74d5591d9442715af8d878f58..cf16a121bff9df0ed8fd0c3037dc7f9e51466070 100644 (file)
@@ -62,6 +62,7 @@ unix: don't define errno if NHSTDC
 X11: avoid a possible crash when using window manger to close a player
        selection window
 Gnome: add Quiver menu item, fix outdated Quit menu item
+Gnome: key values on unsigned char platform could fail to compare correctly
 
 
 General New Features
index b5f4b50317d6dda3e3c6762a3c0627a993e23ac9..37eff8bfbabdf22f216224b8e8d1d276b50bcbd2 100644 (file)
@@ -1021,7 +1021,7 @@ char yn_function(const char *ques, const char *choices, char default)
 char gnome_yn_function(const char *question, const char *choices,
                CHAR_P def)
 {
-    char ch;
+    int ch;
     int result=-1;
     char message[BUFSZ];
     char yn_esc_map='\033';