change type of the bx_list_c::choice var to Bit32u to make in compatible with ask_uint function
This commit is contained in:
parent
2e32bf2d84
commit
795a21ec6d
@ -441,7 +441,7 @@ protected:
|
||||
// for a menu, the value of choice before the call to "ask" is default.
|
||||
// After ask, choice holds the value that the user chose. Choice defaults
|
||||
// to 1 in the constructor.
|
||||
int choice;
|
||||
Bit32u choice; // type Bit32u is compatible with ask_uint
|
||||
// title of the menu or series
|
||||
char *title;
|
||||
void init(const char *list_title);
|
||||
|
@ -999,10 +999,9 @@ int bx_list_c::text_ask(FILE *fpin, FILE *fpout)
|
||||
}
|
||||
}
|
||||
fprintf(fpout, "\n");
|
||||
Bit32u n = (Bit32u) choice;
|
||||
int min = (options & SHOW_PARENT) ? 0 : 1;
|
||||
int max = size;
|
||||
int status = ask_uint("Please choose one: [%d] ", "", min, max, n, &n, 10);
|
||||
int status = ask_uint("Please choose one: [%d] ", "", min, max, choice, &choice, 10);
|
||||
if (status < 0) return status;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user