mirror of
https://github.com/TokTok/c-toxcore
synced 2026-10-22 21:52:43 +00:00
Fixed possible bug in list.
This commit is contained in:
1 file changed
+4
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user