summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-03-01 14:40:17 +0100
committerPatrick Steinhardt <ps@pks.im>2016-03-10 10:28:33 +0100
commite126bc95cd296767ae6c372abb3d4c87ca359a57 (patch)
treeff59a88204a92d415911be652d65903b0a31aef8 /src/commit.c
parent345758ad45ffddb5d69ca2e97324127a20ab6827 (diff)
downloadlibgit2-e126bc95cd296767ae6c372abb3d4c87ca359a57.tar.gz
config_file: handle missing quotation marks in section header
When parsing a section header we expect something along the format of '[section "subsection"]'. When a section is mal-formated and is entirely missing its quotation marks we catch this case by observing that `strchr(line, '"') - strrchr(line, '"') = NULL - NULL = 0` and error out. Unfortunately, the error message is misleading though, as we state that we are missing the closing quotation mark while we in fact miss both quotation marks. Improve the error message by explicitly checking if the first quotation mark could be found and, if not, stating that quotation marks are completely missing.
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions