Commit decb8fcb authored by Trevor Spiteri's avatar Trevor Spiteri Committed by Nathan Lee

out-of-bounds access on Enter-up-down in new text field

Reproduce using:
1. Select text tool (F8)
2. Click on empty canvas
3. Hit Enter
4. Hit Up
5. Hit Down

Backport from 1.0alpha master
Cherry picked from 5ed5cde1
parent 8306201a
......@@ -788,6 +788,9 @@ bool Layout::iterator::nextLineCursor(int n)
- _parent_layout->_chunks[_parent_layout->_spans[_parent_layout->_lineToSpan(line_index)].in_chunk].left_x;
_char_index = _parent_layout->_cursorXOnLineToIterator(line_index + n, _x_coordinate)._char_index;
if (_char_index == _parent_layout->_characters.size())
_glyph_index = _parent_layout->_glyphs.size();
_glyph_index = _parent_layout->_characters[_char_index].in_glyph;
return true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment