all: use the function get_item which checks bounds...

This commit is contained in:
ALONSO Laurent
2021-10-19 13:30:06 +02:00
committed by Celtic Minstrel
parent f52c227516
commit 3451c70fec
12 changed files with 32 additions and 40 deletions

View File

@@ -396,9 +396,9 @@ void handle_menu_choice(eMenu item_hit) {
break;
case eMenu::EDIT_ITEM:
if(scen_items_loaded) {
auto& all_items = univ.scenario.scen_items;
auto const & all_items = univ.scenario.scen_items;
std::vector<std::string> strings;
for(cItem& item : all_items) {
for(cItem const & item : all_items) {
strings.push_back(item.full_name);
}
cStringChoice dlog(strings, "Add which item?");