summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-layout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 5ae46f85..669410ee 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -2425,7 +2425,8 @@ pango_layout_index_to_pos (PangoLayout *layout,
}
while (pango_layout_iter_next_run (&iter));
- break;
+ if (layout_line->start_index + layout_line->length > index)
+ break;
}
if (!pango_layout_iter_next_line (&iter))