summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_code_widget_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_code_widget_text.c')
-rw-r--r--src/lib/elementary/elm_code_widget_text.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_code_widget_text.c b/src/lib/elementary/elm_code_widget_text.c
index a2098a29fe..879a0a7ecf 100644
--- a/src/lib/elementary/elm_code_widget_text.c
+++ b/src/lib/elementary/elm_code_widget_text.c
@@ -174,7 +174,9 @@ _elm_code_widget_line_text_position_for_column_get(Eo *obj, Elm_Code_Widget_Data
174 while ((unsigned int) count <= column && index <= (int) line->length) 174 while ((unsigned int) count <= column && index <= (int) line->length)
175 { 175 {
176 position = (unsigned int) index; 176 position = (unsigned int) index;
177 unicode = eina_unicode_utf8_next_get(chars, &index); 177 if (index < (int) line->length)
178 unicode = eina_unicode_utf8_next_get(chars, &index);
179 else return line->length;
178 180
179 if (unicode == 0) 181 if (unicode == 0)
180 return line->length; 182 return line->length;