From c270aabdc0122e8a572b04566f5a6645cba22c9f Mon Sep 17 00:00:00 2001 From: SangHyeon Jade Lee Date: Thu, 14 Feb 2019 08:50:04 -0500 Subject: [PATCH] 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 --- src/lib/elementary/efl_ui_exact_model.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_exact_model.c b/src/lib/elementary/efl_ui_exact_model.c index b44bd822fc..fac8298745 100644 --- a/src/lib/elementary/efl_ui_exact_model.c +++ b/src/lib/elementary/efl_ui_exact_model.c @@ -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); }