Browse Source

gfsec-split: Fix off-by-one error in menu handler.

Part of the code allowing to select a menu entry failed to
acknowledge that menu entries are numbered starting from one,
not zero.

Incenp-bug-id: 9
develop
Damien Goutte-Gattat 4 years ago
parent
commit
6f44a2f454
  1. 2
      src/gfsec-split.c

2
src/gfsec-split.c

@ -165,7 +165,7 @@ prompt_for_share(gfsec_secret_t *cfg, gfsec_supports_list_t *list, unsigned numb
int selected;
selected = strtol(answer, NULL, 10);
if ( selected > 0 && (unsigned)selected < list->count ) {
if ( selected > 0 && (unsigned)selected < list->count + 1 ) {
path = ask_nonempty(_("Specify a pathname on this support:"));
share = gfsec_share_new();

Loading…
Cancel
Save