Patch from Brett Hunt at micron.com to fixup potential segfaults
authorEric Andersen <andersen@codepoet.org>
Thu, 23 Jan 2003 06:36:15 +0000 (06:36 -0000)
committerEric Andersen <andersen@codepoet.org>
Thu, 23 Jan 2003 06:36:15 +0000 (06:36 -0000)
during 'make menuconfig'

scripts/config/menubox.c

index b9cf4b6a3f2269c4436da8fba6604959bf43e99e..5be3d5611580599f59db10a96f692e1ce7f7ab3b 100644 (file)
@@ -311,8 +311,8 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
 
                     scroll--;
 
-                    print_item (menu, items[scroll * 2]->name, 0, FALSE,
-                               (items[scroll * 2]->tag[0] != ':'));
+                    print_item (menu, items[scroll]->name, 0, FALSE,
+                               (items[scroll]->tag[0] != ':'));
                } else
                    choice = MAX(choice - 1, 0);
 
@@ -343,8 +343,8 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
                     if (scroll > 0) {
                        wscrl (menu, -1);
                        scroll--;
-                       print_item (menu, items[scroll * 2]->name, 0, FALSE,
-                       (items[scroll * 2]->tag[0] != ':'));
+                       print_item (menu, items[scroll]->name, 0, FALSE,
+                       (items[scroll]->tag[0] != ':'));
                     } else {
                         if (choice > 0)
                             choice--;