diff options
-rw-r--r-- | mdk-stage1/stdio-frontend.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mdk-stage1/stdio-frontend.c b/mdk-stage1/stdio-frontend.c index 7d3c6f14b..bf6d5abfc 100644 --- a/mdk-stage1/stdio-frontend.c +++ b/mdk-stage1/stdio-frontend.c @@ -30,7 +30,7 @@ #include <probing.h> #include "frontend.h" - +#include "utils.h" void init_frontend(char * welcome_msg) { @@ -248,18 +248,12 @@ enum return_type ask_from_list_index(char *msg, char ** elems, char ** elems_com snprintf(tmp, sizeof(tmp), "[%%%dd]", justify_number); printf(tmp, i); } - char ** sav_elems = elems; int i = 1; int j = 0; - while (elems && *elems) { - elems++; - i++; - } - if (i >= 10) + if (string_array_length(elems) >= 10) justify_number = 2; - elems = sav_elems; i = 1; printf("> %s\n", msg); |