diff options
author | jkh <jkh@FreeBSD.org> | 1999-12-14 04:18:22 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-12-14 04:18:22 +0000 |
commit | 796518d06842cbc05ce0994ade4027837c42cec0 (patch) | |
tree | 6eba2fe5287731a9765af35a31d1a2fe87c0cc8d /gnu/lib/libdialog/checklist.c | |
parent | 92bdda92f42925230e9bc724b4786896f2755e88 (diff) | |
download | FreeBSD-src-796518d06842cbc05ce0994ade4027837c42cec0.zip FreeBSD-src-796518d06842cbc05ce0994ade4027837c42cec0.tar.gz |
Prevent spaces from being interpreted as accelerators.
Diffstat (limited to 'gnu/lib/libdialog/checklist.c')
-rw-r--r-- | gnu/lib/libdialog/checklist.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c index e5f9ddd..5db04c7 100644 --- a/gnu/lib/libdialog/checklist.c +++ b/gnu/lib/libdialog/checklist.c @@ -18,8 +18,12 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * */ +#ifndef lint +static const char rcsid[] = "$FreeBSD$"; +#endif #include <dialog.h> #include "dialog.priv.h" @@ -251,9 +255,9 @@ draw: /* Check if key pressed matches first character of any item tag in list */ for (i = 0; i < max_choice; i++) - if (key < 0x100 && toupper(key) == toupper(items[(scroll+i)*3][0])) + if (isprint(key) && key < 0x100 && toupper(key) == toupper(items[(scroll+i)*3][0])) break; - + if (i < max_choice || (key >= '1' && key <= MIN('9', '0'+max_choice)) || KEY_IS_UP(key) || KEY_IS_DOWN(key) || key == ' ') { |