diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-06-23 13:16:51 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-06-23 13:16:51 +0100 |
| commit | b934c8ede532284e5c961e10f1d7591d4e4de1a7 (patch) | |
| tree | 1c95ba834cb386bd31f5293e4cd5d8e2bd6b863d /src | |
| parent | 352228c3b0c755c6aee5627d61598be10f5889f7 (diff) | |
Fix crash in Context::main_sel_register_value
Diffstat (limited to 'src')
| -rw-r--r-- | src/context.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/context.cc b/src/context.cc index 64bf8a4c..93bf8a7f 100644 --- a/src/context.cc +++ b/src/context.cc @@ -231,7 +231,7 @@ StringView Context::main_sel_register_value(StringView reg) const { auto strings = RegisterManager::instance()[reg].values(*this); size_t index = m_selections ? (*m_selections).main_index() : 0; - if (strings.size() < index) + if (strings.size() <= index) index = strings.size() - 1; return strings[index]; } |
