fix slist search off by 1

pull/559/head cares-1_20_0
Brad House 1 year ago
parent f4f96b9ea6
commit bfe84bf251
  1. 2
      src/lib/ares__slist.c

@ -315,7 +315,7 @@ ares__slist_node_t *ares__slist_node_find(ares__slist_t *list, const void *val)
/* Scan nodes starting at the highest level. For each level scan forward
* until the value is between the prior and next node, or if equal quit
* as we found a match */
for (i=list->levels-1; i-- > 0; ) {
for (i=list->levels; i-- > 0; ) {
if (node == NULL)
node = list->head[i];

Loading…
Cancel
Save