fixed an empty_string.at(0) error
This commit is contained in:
parent
9d8e4bcea5
commit
834a467fca
1 changed files with 2 additions and 1 deletions
|
@ -799,7 +799,8 @@ void menu::column_widths_item(const std::vector<std::string>& row, std::vector<i
|
|||
bool menu::item_ends_with_image(const std::string& item) const
|
||||
{
|
||||
std::string::size_type pos = item.find_last_of(IMG_TEXT_SEPARATOR);
|
||||
return(item.at((pos == std::string::npos) ? 0 : pos+1) == IMAGE_PREFIX);
|
||||
pos = (pos == std::string::npos) ? 0 : pos+1;
|
||||
return(item.size() > pos && item.at(pos) == IMAGE_PREFIX);
|
||||
}
|
||||
|
||||
const std::vector<int>& menu::column_widths() const
|
||||
|
|
Loading…
Add table
Reference in a new issue