From 60d40fa1a8c366ae7a9db2082720395d3dc7c7d8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 3 Feb 2008 02:56:41 +0100 Subject: [PATCH] parse comments properly --- file.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/file.c b/file.c index 23ea959..4b607f8 100644 --- a/file.c +++ b/file.c @@ -210,6 +210,9 @@ static void parse_str(struct uci_context *ctx, char **str, char **target) case '"': parse_double_quote(ctx, str, target); break; + case '#': + **str = 0; + /* fall through */ case 0: goto done; case '\\': @@ -451,6 +454,8 @@ static void uci_parse_line(struct uci_context *ctx, bool single) word = strtok_r(word, " \t", &pbrk); switch(word[0]) { + case '#': + return; case 'p': if ((word[1] == 0) || !strcmp(word + 1, "ackage")) uci_parse_package(ctx, &word, single); -- 2.25.1