Merge pull request #2054 from hwangcc23/fix-2051

Fix config validation fail when no new line from end of file
This commit is contained in:
Michael Stapelberg 2015-11-02 20:13:20 +01:00
commit 31121f1334
1 changed files with 1 additions and 1 deletions

View File

@ -843,7 +843,7 @@ bool parse_file(const char *f, bool use_nagbar) {
break;
die("Could not read configuration file\n");
}
if (buffer[strlen(buffer) - 1] != '\n') {
if (buffer[strlen(buffer) - 1] != '\n' && !feof(fstr)) {
ELOG("Your line continuation is too long, it exceeds %zd bytes\n", sizeof(buffer));
}
continuation = strstr(buffer, "\\\n");