mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
config:: list_setting::show_edit_option won't crash if value is illegal
This commit is contained in:
parent
83b49caa5f
commit
933361d394
@ -3710,7 +3710,9 @@ EX void edit_all_settings() {
|
||||
}
|
||||
|
||||
void list_setting::show_edit_option(int key) {
|
||||
string opt = options[get_value()].first;
|
||||
string opt;
|
||||
if(get_value() < 0 || get_value() >= isize(options)) opt = its(get_value());
|
||||
else opt = options[get_value()].first;
|
||||
dialog::addSelItem(XLAT(menu_item_name), XLAT(opt), key);
|
||||
dialog::add_action_push([this] {
|
||||
add_to_changed(this);
|
||||
|
Loading…
Reference in New Issue
Block a user