mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed possible bug in list.
This commit is contained in:
parent
a4ac1497a5
commit
2cbfbef6e5
|
@ -55,6 +55,10 @@ static int find(LIST *list, void *data)
|
|||
uint32_t i = list->n / 2; //current position in the array
|
||||
uint32_t delta = i / 2; //how much we move in the array
|
||||
|
||||
if (!delta) {
|
||||
delta = 1;
|
||||
}
|
||||
|
||||
int d = -1; //used to determine if closest match is found
|
||||
//closest match is found if we move back to where we have already been
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user