Update hsmtool.c

This line is a cosmetic off-by-one error. There are 7 languages defined, but because counting starts at 0, the display is "Select [0-7]" when in fact only 0-6 are valid choices.
This commit is contained in:
bstin 2024-02-20 10:21:54 -06:00 committed by Rusty Russell
parent 9450d46db1
commit 6edbc635cc

View File

@ -474,7 +474,7 @@ static void get_words(struct words **words) {
for (size_t i = 0; i < ARRAY_SIZE(languages); i++) {
printf(" %zu) %s (%s)\n", i, languages[i].name, languages[i].abbr);
}
printf("Select [0-%zu]: ", ARRAY_SIZE(languages));
printf("Select [0-%zu]: ", ARRAY_SIZE(languages)-1);
fflush(stdout);
char *selected = NULL;