Commit 87de3cf4 authored by Nathan Lee's avatar Nathan Lee

Adds out of bound check for selecting text on path

Fixes inbox#420
parent f09728fd
Pipeline #59648077 failed with stages
in 130 minutes
......@@ -308,8 +308,10 @@ Geom::Rect Layout::characterBoundingBox(iterator const &it, double *rotation) co
if (_path_fitted) {
double cluster_half_width = 0.0;
for (int glyph_index = _characters[char_index].in_glyph ; _glyphs[glyph_index].in_character == char_index ; glyph_index++)
for (int glyph_index = _characters[char_index].in_glyph ; _glyphs.size() != glyph_index ; glyph_index++) {
if (_glyphs[glyph_index].in_character != char_index) break;
cluster_half_width += _glyphs[glyph_index].width;
}
cluster_half_width *= 0.5;
double midpoint_offset = _characters[char_index].span(this).x_start + _characters[char_index].x + cluster_half_width;
......
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