From 9c944b02362d09ab4f88539ff8298062421528d8 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Wed, 10 Mar 2010 13:02:01 -0300 Subject: [PATCH] Fix config reader, do not read empty spaces --- src/config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 630a89c..406e5dc 100644 --- a/src/config.c +++ b/src/config.c @@ -66,7 +66,7 @@ struct mk_config *mk_config_create(char *path) continue; key = strtok_r(buf, "\"\t ", &last); - val = strtok_r(NULL, "\n", &last); + val = strtok_r(NULL, "\"\t ", &last); if (!key || !val) { continue; @@ -75,6 +75,7 @@ struct mk_config *mk_config_create(char *path) /* Allow new entry found */ new = mk_mem_malloc(sizeof(struct mk_config)); new->key = mk_string_dup(key); + new->val = mk_string_dup(val); new->next = NULL; -- 2.11.4.GIT