diff options
author | Jiang Xin <worldhello.net@gmail.com> | 2012-03-16 20:18:07 +0800 |
---|---|---|
committer | Jiang Xin <worldhello.net@gmail.com> | 2012-03-16 20:18:07 +0800 |
commit | d90b16ed421eb51fc4d7c6bda5f3332cc2e3aece (patch) | |
tree | 2d90d25ecbe794492f0fb267f31af8a1f646327d /config.c | |
parent | l10n: Improve zh_CN translation for msg "not something we can merge" (diff) | |
parent | Git 1.7.10-rc1 (diff) | |
download | tgif-d90b16ed421eb51fc4d7c6bda5f3332cc2e3aece.tar.xz |
Merge v1.7.10-rc0 for git l10n update
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -196,8 +196,10 @@ static char *parse_value(void) for (;;) { int c = get_next_char(); if (c == '\n') { - if (quote) + if (quote) { + cf->linenr--; return NULL; + } return cf->value.buf; } if (comment) @@ -287,7 +289,7 @@ static int get_extended_base_var(char *name, int baselen, int c) { do { if (c == '\n') - return -1; + goto error_incomplete_line; c = get_next_char(); } while (isspace(c)); @@ -299,13 +301,13 @@ static int get_extended_base_var(char *name, int baselen, int c) for (;;) { int c = get_next_char(); if (c == '\n') - return -1; + goto error_incomplete_line; if (c == '"') break; if (c == '\\') { c = get_next_char(); if (c == '\n') - return -1; + goto error_incomplete_line; } name[baselen++] = c; if (baselen > MAXNAME / 2) @@ -316,6 +318,9 @@ static int get_extended_base_var(char *name, int baselen, int c) if (get_next_char() != ']') return -1; return baselen; +error_incomplete_line: + cf->linenr--; + return -1; } static int get_base_var(char *name) |