forked from enlightenment/efl
collection_view: fix a potentional error
assign signed int value on bigger unsigned variable can make information of the varaible lost. this patch fix the problem. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10723
This commit is contained in:
parent
5894d384f2
commit
1aa5b0c2e8
|
@ -2302,7 +2302,7 @@ _efl_ui_collection_view_focus_manager_efl_ui_focus_manager_request_move(Eo *obj,
|
|||
new_id = efl_ui_position_manager_entity_relative_item(cpd->manager,
|
||||
item_id,
|
||||
direction);
|
||||
if (new_id == -1)
|
||||
if (new_id < 0)
|
||||
{
|
||||
new_item = NULL;
|
||||
}
|
||||
|
@ -2326,7 +2326,7 @@ _efl_ui_collection_view_focus_manager_efl_ui_focus_manager_request_move(Eo *obj,
|
|||
_assert_item_available(new_item, new_id, cpd);
|
||||
}
|
||||
#else
|
||||
uint64_t search_index = new_id;
|
||||
uint64_t search_index = (uint64_t)new_id;
|
||||
lookup = (void*) eina_rbtree_inline_lookup(cpd->cache, &search_index,
|
||||
sizeof (new_id), _cache_tree_lookup,
|
||||
NULL);
|
||||
|
|
Loading…
Reference in New Issue