From: Michael Stapelberg Date: Mon, 2 Nov 2015 19:13:20 +0000 (+0100) Subject: Merge pull request #2054 from hwangcc23/fix-2051 X-Git-Tag: 4.12~108 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=31121f133456868d027bd4fcda3d5691641c3c67;hp=911ce37871530dd57188e935a5c78751bf729ee0;p=i3%2Fi3 Merge pull request #2054 from hwangcc23/fix-2051 Fix config validation fail when no new line from end of file --- diff --git a/src/config_parser.c b/src/config_parser.c index 0f3d33ec..27cdeb93 100644 --- a/src/config_parser.c +++ b/src/config_parser.c @@ -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");