Fixed possible bug in list.

This commit is contained in:
irungentoo 2014-06-06 09:00:12 -04:00
parent a4ac1497a5
commit 2cbfbef6e5
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -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