Fix invalid memory access when getting the main entry of empty registers
Fixes #3370
This commit is contained in:
parent
e9cf0f23f2
commit
940b1b6175
|
@ -48,7 +48,8 @@ public:
|
|||
|
||||
const String& get_main(const Context& context, size_t main_index) override
|
||||
{
|
||||
return get(context)[std::min(main_index, m_content.size() - 1)];
|
||||
auto content = get(context);
|
||||
return content[std::min(main_index, content.size() - 1)];
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in New Issue
Block a user