Skip to content

Commit

Permalink
Update hsmtool.c
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bstin authored Feb 20, 2024
1 parent e2aa4f1 commit b092517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/hsmtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b092517

Please sign in to comment.