make csv parsing notice the last letter of each entry too

svn:r2261
This commit is contained in:
Roger Dingledine 2004-08-17 11:55:47 +00:00
parent 0131d94a6c
commit 4c47e07a11

View File

@ -154,7 +154,7 @@ static void parse_csv_into_smartlist(smartlist_t *lst, const char *val)
tor_assert(cp <= end);
tor_assert(*end == '\0' || *end == ',');
tor_assert((!isspace(*start) && !isspace(*cp)) || start==cp);
smartlist_add(lst, tor_strndup(start, cp-start));
smartlist_add(lst, tor_strndup(start, cp-start+1));
if (!*end)
break;
cp = end+1;