Fix crash in Context::main_sel_register_value
This commit is contained in:
parent
352228c3b0
commit
b934c8ede5
|
@ -231,7 +231,7 @@ StringView Context::main_sel_register_value(StringView reg) const
|
||||||
{
|
{
|
||||||
auto strings = RegisterManager::instance()[reg].values(*this);
|
auto strings = RegisterManager::instance()[reg].values(*this);
|
||||||
size_t index = m_selections ? (*m_selections).main_index() : 0;
|
size_t index = m_selections ? (*m_selections).main_index() : 0;
|
||||||
if (strings.size() < index)
|
if (strings.size() <= index)
|
||||||
index = strings.size() - 1;
|
index = strings.size() - 1;
|
||||||
return strings[index];
|
return strings[index];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user