efl_ui : fix infinite loop in efl_ui_exact model

Summary:
the loop in infinite because of wrong condition.
need to loop while the count of list_index.

Reviewers: cedric, zmike

Subscribers: zmike, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7925
This commit is contained in:
SangHyeon Jade Lee 2019-02-14 08:50:04 -05:00 committed by Mike Blumenkrantz
parent 39aee23368
commit c270aabdc0
1 changed files with 5 additions and 1 deletions

View File

@ -76,6 +76,7 @@ _efl_ui_exact_model_slot_compress(unsigned int index, Eina_List *compressed, uns
Eina_Binbuf *cbuf;
Eina_Binbuf *tbuf;
Eina_List *l = NULL;
unsigned int i;
_efl_ui_exact_model_list_find(list_index, compressed, &l);
@ -106,7 +107,10 @@ _efl_ui_exact_model_slot_compress(unsigned int index, Eina_List *compressed, uns
}
// Fill the list all the way to the needed index with buffer full of zero
while (list_index) compressed = eina_list_append(compressed, z);
for (i = 0; i < list_index; i++)
{
compressed = eina_list_append(compressed, z);
}
l = eina_list_last(compressed);
}