diff options
-rw-r--r-- | scripts/lxdialog/menubox.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lxdialog/menubox.c b/scripts/lxdialog/menubox.c index d0bf32b34090..2d91880825ed 100644 --- a/scripts/lxdialog/menubox.c +++ b/scripts/lxdialog/menubox.c | |||
@@ -70,7 +70,7 @@ static void do_print_item(WINDOW * win, const char *item, int choice, | |||
70 | int j; | 70 | int j; |
71 | char *menu_item = malloc(menu_width + 1); | 71 | char *menu_item = malloc(menu_width + 1); |
72 | 72 | ||
73 | strncpy(menu_item, item, menu_width); | 73 | strncpy(menu_item, item, menu_width - ITEM_IDENT); |
74 | menu_item[menu_width] = 0; | 74 | menu_item[menu_width] = 0; |
75 | j = first_alpha(menu_item, "YyNnMmHh"); | 75 | j = first_alpha(menu_item, "YyNnMmHh"); |
76 | 76 | ||
@@ -184,8 +184,8 @@ int dialog_menu(const char *title, const char *prompt, int height, int width, | |||
184 | const char *const *items) | 184 | const char *const *items) |
185 | { | 185 | { |
186 | int i, j, x, y, box_x, box_y; | 186 | int i, j, x, y, box_x, box_y; |
187 | int key = 0, button = 0, scroll = 0, choice = 0, first_item = | 187 | int key = 0, button = 0, scroll = 0, choice = 0; |
188 | 0, max_choice; | 188 | int first_item = 0, max_choice; |
189 | WINDOW *dialog, *menu; | 189 | WINDOW *dialog, *menu; |
190 | FILE *f; | 190 | FILE *f; |
191 | 191 | ||