hdt: do not invoke help if helpid is 0xFFFF
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Mon, 7 Sep 2009 22:10:20 +0000 (15:10 -0700)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Mon, 7 Sep 2009 22:10:20 +0000 (15:10 -0700)
0xFFFF is invalid (no help).

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
com32/hdt/hdt-menu.c

index 894a7d1..2297952 100644 (file)
@@ -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.