diff options
| author | Sven Strickroth <email@cs-ware.de> | 2021-11-25 10:22:22 +0100 |
|---|---|---|
| committer | Sven Strickroth <email@cs-ware.de> | 2021-12-06 13:28:07 +0100 |
| commit | 433edb54b74cab470a1129cc8df5cbfaa0166c62 (patch) | |
| tree | fda80786cfbb982be93278642df1cbde48876d15 /src | |
| parent | f9c4dc10d90732cfbe2271dd58b01dd8f4003d15 (diff) | |
| download | libgit2-433edb54b74cab470a1129cc8df5cbfaa0166c62.tar.gz | |
Config parsing confused by continuations that start with quotes
(fixes issue #6089)
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'src')
| -rw-r--r-- | src/config_parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config_parse.c b/src/config_parse.c index 3159cbef7..e96edc36d 100644 --- a/src/config_parse.c +++ b/src/config_parse.c @@ -36,7 +36,7 @@ static int strip_comments(char *line, int in_quotes) char *ptr; for (ptr = line; *ptr; ++ptr) { - if (ptr[0] == '"' && ptr > line && ptr[-1] != '\\') + if (ptr[0] == '"' && ((ptr > line && ptr[-1] != '\\') || ptr == line)) quote_count++; if ((ptr[0] == ';' || ptr[0] == '#') && |
