From 05081b7b84f50ea8c39ee879f7c43e41589fa71f Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 21 Nov 2005 22:59:32 +0100 Subject: [PATCH] --- yaml --- r: 15890 b: refs/heads/master c: e067e1f98d54d62fd598126f95e7684e5b63e67f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/lxdialog/menubox.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index bec4504008eb..b3bdb1393f49 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 59d3cf7a40dfdbb8e86758ade172831c19630050 +refs/heads/master: e067e1f98d54d62fd598126f95e7684e5b63e67f diff --git a/trunk/scripts/lxdialog/menubox.c b/trunk/scripts/lxdialog/menubox.c index d0bf32b34090..2d91880825ed 100644 --- a/trunk/scripts/lxdialog/menubox.c +++ b/trunk/scripts/lxdialog/menubox.c @@ -70,7 +70,7 @@ static void do_print_item(WINDOW * win, const char *item, int choice, int j; char *menu_item = malloc(menu_width + 1); - strncpy(menu_item, item, menu_width); + strncpy(menu_item, item, menu_width - ITEM_IDENT); menu_item[menu_width] = 0; j = first_alpha(menu_item, "YyNnMmHh"); @@ -184,8 +184,8 @@ int dialog_menu(const char *title, const char *prompt, int height, int width, const char *const *items) { int i, j, x, y, box_x, box_y; - int key = 0, button = 0, scroll = 0, choice = 0, first_item = - 0, max_choice; + int key = 0, button = 0, scroll = 0, choice = 0; + int first_item = 0, max_choice; WINDOW *dialog, *menu; FILE *f;