From: cohrs Date: Tue, 14 Oct 2003 07:07:40 +0000 (+0000) Subject: debian #170531 - sign extension in gnome input X-Git-Tag: MOVE2GIT~1701 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d533b7b39355e1a9df12a2d1d5804d600b180e8;p=nethack debian #170531 - sign extension in gnome input 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. --- diff --git a/doc/fixes34.3 b/doc/fixes34.3 index a86b9d355..cf16a121b 100644 --- a/doc/fixes34.3 +++ b/doc/fixes34.3 @@ -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 diff --git a/win/gnome/gnbind.c b/win/gnome/gnbind.c index b5f4b5031..37eff8bfb 100644 --- a/win/gnome/gnbind.c +++ b/win/gnome/gnbind.c @@ -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';