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.
This commit is contained in:
cohrs
2003-10-14 07:07:40 +00:00
parent 120d0b0295
commit 0d533b7b39
2 changed files with 2 additions and 1 deletions
+1
View 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 X11: avoid a possible crash when using window manger to close a player
selection window selection window
Gnome: add Quiver menu item, fix outdated Quit menu item 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 General New Features
+1 -1
View 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 gnome_yn_function(const char *question, const char *choices,
CHAR_P def) CHAR_P def)
{ {
char ch; int ch;
int result=-1; int result=-1;
char message[BUFSZ]; char message[BUFSZ];
char yn_esc_map='\033'; char yn_esc_map='\033';