Commit ec7c0d18 authored by Thomas Roessler's avatar Thomas Roessler

Don't add empty strings to lists. From Thomas Parmelan

<[email protected]>.
parent f08c3ad0
......@@ -308,6 +308,10 @@ static void add_to_list (LIST **list, const char *str)
LIST *t, *last = NULL;
/* don't add a NULL or empty string to the list */
if (!str || *str == '\0')
/* check to make sure the item is not already on this list */
for (last = *list; last; last = last->next)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment