mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 20:17:59 +00:00
config: peek returns '\n' on EOF; handle in write
This commit is contained in:
parent
6dc55872a8
commit
d369d71f6a
@ -1423,7 +1423,7 @@ static int config_write(diskfile_backend *cfg, const char *key, const regex_t *p
|
||||
while (!reader->eof) {
|
||||
c = reader_peek(reader, SKIP_WHITESPACE);
|
||||
|
||||
if (c == '\0') { /* We've arrived at the end of the file */
|
||||
if (c == '\n') { /* We've arrived at the end of the file */
|
||||
break;
|
||||
|
||||
} else if (c == '[') { /* section header, new section begins */
|
||||
|
Loading…
Reference in New Issue
Block a user