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:
commit
31121f1334
@ -843,7 +843,7 @@ bool parse_file(const char *f, bool use_nagbar) {
|
|||||||
break;
|
break;
|
||||||
die("Could not read configuration file\n");
|
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));
|
ELOG("Your line continuation is too long, it exceeds %zd bytes\n", sizeof(buffer));
|
||||||
}
|
}
|
||||||
continuation = strstr(buffer, "\\\n");
|
continuation = strstr(buffer, "\\\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user