Fix a crash when resizing if the file is longer than the viewport

This commit is contained in:
Andy Williams 2014-11-05 13:36:54 +00:00
parent 4be9198da5
commit 4eec76793b
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ EAPI void elm_code_widget_fill(Evas_Object *o, Elm_Code *code)
ceil(((double) h) / ch));
evas_object_textgrid_size_get(o, &w, &h);
for (y = 1; y <= elm_code_file_lines_get(code->file); y++)
for (y = 1; y <= (unsigned int) h && y <= elm_code_file_lines_get(code->file); y++)
{
line = elm_code_file_line_get(code->file, y);
content = elm_code_file_line_content_get(code->file, y);