mirror of
https://github.com/Motion-Project/motion.git
synced 2026-04-21 06:27:00 -04:00
Merge pull request #161 from jogu/whitespace-only-conf-lines
Fix for whitespace only lines in config file
This commit is contained in:
2
conf.c
2
conf.c
@@ -1750,7 +1750,7 @@ static struct context **conf_process(struct context **cnt, FILE *fp)
|
||||
|
||||
/* Trim white space and any CR or LF at the end of the line. */
|
||||
end = line + strlen(line) - 1; /* Point to the last non-null character in the string. */
|
||||
while (*end == ' ' || *end == '\t' || *end == '\n' || *end == '\r')
|
||||
while (end >= line && (*end == ' ' || *end == '\t' || *end == '\n' || *end == '\r'))
|
||||
end--;
|
||||
|
||||
*(end+1) = '\0';
|
||||
|
||||
Reference in New Issue
Block a user