X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fciniparser%2Fciniparser.c;h=2b60e409bd7ac7259d2e5245fd457e8087ed7472;hp=5e27a25333a0b49e72c88d0e25606ef8f4ac8e55;hb=4f09cf20ca00fe38b0702e0556bbad2341595ed0;hpb=39357f4e89f4ac02eb11861812cbfc67b4f1d4ef diff --git a/ccan/ciniparser/ciniparser.c b/ccan/ciniparser/ciniparser.c index 5e27a253..2b60e409 100644 --- a/ccan/ciniparser/ciniparser.c +++ b/ccan/ciniparser/ciniparser.c @@ -128,7 +128,6 @@ line_status ciniparser_line(char *input_line, char *section, strcpy(line, strstrip(input_line)); len = (int) strlen(line); - sta = LINE_UNPROCESSED; if (len < 1) { /* Empty line */ sta = LINE_EMPTY; @@ -424,12 +423,10 @@ dictionary *ciniparser_load(const char *ininame) } /* Detect multi-line */ - if (line[len] == '\\') { + if (len >= 0 && line[len] == '\\') { /* Multi-line value */ last = len; continue; - } else { - last = 0; } switch (ciniparser_line(line, section, key, val)) {