Mercurial > hg > nnchat
changeset 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 | d2e3a95c74df |
children | 77c35cdd5ce3 |
files | th_config.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
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;