diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-01-13 19:33:54 +0100 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-01-13 19:33:54 +0100 |
commit | c1c399cf27fbb085e402afd6a405b1c24ddee478 (patch) | |
tree | aa7ab0ffa58999d3ec44ef88918403ab1c0837eb /include/git2/commit.h | |
parent | 2866c016853b5e5006d3e02758cbb8d9e1857347 (diff) | |
download | libgit2-c1c399cf27fbb085e402afd6a405b1c24ddee478.tar.gz |
config: handle EOF properly
In the main loop we peek to see what kind of line the next one is. If
there are multiple newlines before the end of the file, the eof marker
won't be set after we read the last line with data and we'll try to
peek again. This peek will return LF (as it pretends that we have a
newline at EOF so other function don't need any special handling).
Fix cfg_getchar so it doesn't try to read past the last character in
the file and config_parse so it considers LF as EOF on peek (as we're
ignoring spaces) and sets the reader's EOF flag to exit the parsing
loop.
Diffstat (limited to 'include/git2/commit.h')
0 files changed, 0 insertions, 0 deletions