Fix of a small bug found by MSVC iterator assertions

This commit is contained in:
Matthias Köfferlein 2018-09-02 22:57:01 +02:00
parent 406b2c8cd1
commit 4e12b9fae7
1 changed files with 1 additions and 1 deletions

View File

@ -638,7 +638,7 @@ void MacroEditorPage::cursor_position_changed ()
QString t = b.text ().mid (int (pos), 1);
forward = (t == open_rbracket || t == open_sqbracket || t == open_cbracket);
}
if (e != user_data->elements ().begin () && e[-1].start_offset + e[-1].length >= pos && valid_element (*e)) {
if (e != user_data->elements ().begin () && e[-1].start_offset + e[-1].length >= pos && valid_element (e[-1])) {
QString t = b.text ().mid (int (pos) - 1, 1);
backward = (t == close_rbracket || t == close_sqbracket || t == close_cbracket);
}