diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-06-24 08:40:00 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-06-24 08:52:02 -0400 |
commit | 7fa2dc0c69a1b1499913be65a20619e35b149ec5 (patch) | |
tree | b117cbf72fd4b1fb2b7e5c9aa021e5d918b541f5 /pango/glyphstring.c | |
parent | ab12425de4668f02f7390b987f94374fa5f6f871 (diff) | |
download | pango-7fa2dc0c69a1b1499913be65a20619e35b149ec5.tar.gz |
Fix handling of ligature carets in some casesfix-lig-carets-sinhala
With a text of "ර් ", we were accidentally producing
a cursor position outside of the [start_xpos, end_xpos]
range, which clearly makes no sense.
Test included.
Fixes: #684
Diffstat (limited to 'pango/glyphstring.c')
-rw-r--r-- | pango/glyphstring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pango/glyphstring.c b/pango/glyphstring.c index ea9a6398..e52d41d4 100644 --- a/pango/glyphstring.c +++ b/pango/glyphstring.c @@ -548,7 +548,7 @@ pango_glyph_string_index_to_x_full (PangoGlyphString *glyphs, } if (trailing) - cluster_offset += 1; + cluster_offset = MIN (cluster_offset + 1, cluster_chars); if (G_UNLIKELY (!cluster_chars)) /* pedantic */ { |