elm_code: Fix crash on tabs in long lines

@fix
This commit is contained in:
Andy Williams 2017-05-19 00:01:23 +01:00
parent 76806fda80
commit 7510a2a9ee
1 changed files with 1 additions and 1 deletions

View File

@ -362,7 +362,7 @@ _elm_code_widget_fill_line(Elm_Code_Widget *widget, Elm_Code_Line *line)
charwidth = 1;
if (unichr == '\t')
charwidth = elm_code_widget_text_tabwidth_at_column_get(widget, x - gutter + 1);
for (i = x + 1; i < x + charwidth; i++)
for (i = x + 1; i < x + charwidth && i < (unsigned int) w; i++)
{
cells[i].codepoint = 0;
cells[i].bg = _elm_code_widget_status_type_get(widget, line, i - gutter + 1);