Commit da1e8584 authored by Max Kellermann's avatar Max Kellermann

strset: fix duplicate values

Due to a minor typo, the string set had duplicate values, because strset_add() didn't check the base slot properly.
parent f0e64ceb
......@@ -85,7 +85,7 @@ void strset_add(struct strset *set, const char *value)
return;
}
for (slot = base_slot->next; slot != NULL; slot = slot->next)
for (slot = base_slot; slot != NULL; slot = slot->next)
if (strcmp(slot->value, value) == 0)
/* found it - do nothing */
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment