From bb0a9e19885372d2fa50fe6d5514f3dd934b18a0 Mon Sep 17 00:00:00 2001 From: Pierre-Alexandre Meyer Date: Mon, 7 Sep 2009 15:10:20 -0700 Subject: [PATCH] hdt: do not invoke help if helpid is 0xFFFF 0xFFFF is invalid (no help). Signed-off-by: Pierre-Alexandre Meyer --- com32/hdt/hdt-menu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/com32/hdt/hdt-menu.c b/com32/hdt/hdt-menu.c index 894a7d1..2297952 100644 --- a/com32/hdt/hdt-menu.c +++ b/com32/hdt/hdt-menu.c @@ -89,9 +89,11 @@ void keys_handler(t_menusystem * ms __attribute__ (( unused )), t_menuitem * mi, { int nr, nc; - if (scancode == KEY_F1) { // If scancode of F1 + /* 0xFFFF is an invalid helpid */ + if (scancode == KEY_F1 && mi->helpid != 0xFFFF) { runhelpsystem(mi->helpid); } + /* * If user hit TAB, and item is an "executable" item * and user has privileges to edit it, edit it in place. -- 2.7.4