add methods get_special_string to check access bounds of spec_strs...

This commit is contained in:
ALONSO Laurent
2021-10-22 13:39:28 +02:00
committed by Celtic Minstrel
parent 0c269c420c
commit a51ba34650
16 changed files with 143 additions and 67 deletions

View File

@@ -641,11 +641,11 @@ void story_dialog(std::string title, str_num_t first, str_num_t last, eSpecCtxTy
cur++;
}
if(which_str_type == eSpecCtxType::SCEN)
me["str"].setText(univ.scenario.spec_strs[cur]);
me["str"].setText(univ.scenario.get_special_string(cur));
else if(which_str_type == eSpecCtxType::OUTDOOR)
me["str"].setText(univ.out->spec_strs[cur]);
me["str"].setText(univ.out->get_special_string(cur));
else if(which_str_type == eSpecCtxType::TOWN)
me["str"].setText(univ.town->spec_strs[cur]);
me["str"].setText(univ.town->get_special_string(cur));
return true;
}, {"left", "right", "done"});
story_dlg["left"].triggerClickHandler(story_dlg, "left", eKeyMod());