Merge pull request #616 from jg1uaa/master

permit inline comment (2)
This commit is contained in:
Jonathan Naylor
2020-07-04 10:45:25 +01:00
committed by GitHub

View File

@@ -391,8 +391,16 @@ bool CConf::read()
value[len - 1U] = '\0';
value++;
} else {
char *p;
// if value is not quoted, remove after # (to make comment)
strtok(value, "#");
if ((p = strchr(value, '#')) != NULL)
*p = '\0';
// remove trailing tab/space
for (p = value + strlen(value) - 1;
p >= value && (*p == '\t' || *p == ' '); p--)
*p = '\0';
}
if (section == SECTION_GENERAL) {