Merge remote-tracking branch 'upstream/master' into ipv6
This commit is contained in:
commit
c40291dcc2
10
Conf.cpp
10
Conf.cpp
|
@ -392,8 +392,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) {
|
||||
|
|
Loading…
Reference in a new issue