Mercurial > hg > nnchat
diff th_config.c @ 146:c6c3825376c9
Fix string list parsing and handling in configuration parser.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 02 Nov 2010 22:33:38 +0200 |
parents | 3e221c16b087 |
children | f7b571debd81 |
line wrap: on
line diff
--- a/th_config.c Tue Nov 02 21:51:46 2010 +0200 +++ b/th_config.c Tue Nov 02 22:33:38 2010 +0200 @@ -426,8 +426,11 @@ } else if (c == ',') { switch (item->type) { case ITEM_STRING_LIST: + c = -1; + isStart = TRUE; prevMode = parseMode; - parseMode = PM_STRING; + parseMode = PM_NEXT; + nextMode = PM_STRING; break; } } else { @@ -480,7 +483,7 @@ parseMode = PM_NORMAL; break; case ITEM_STRING_LIST: -// th_cfg_add_to_array(item, th_strdup(tmpStr)); + th_llist_append(item->list, th_strdup(tmpStr)); prevMode = parseMode; parseMode = PM_NEXT; nextMode = PM_ARRAY;