Skip trailing whitespace when reading config file.

This commit is contained in:
Olaf Dietsche
2015-07-08 04:52:01 +02:00
parent d5cd06e3cb
commit bf83ea12bd

View File

@ -670,7 +670,8 @@ sb_list_t *read_config(FILE *fp, sb_list_t *options)
if (*tmp == VALUE_SEPARATOR)
tmp++;
} else {
for (optlen = 0; tmp[optlen] != '\0' && tmp[optlen] != VALUE_SEPARATOR;
for (optlen = 0; tmp[optlen] != '\0' && tmp[optlen] != VALUE_SEPARATOR
&& !isspace(tmp[optlen]);
optlen++)
{
/* Empty */