mirror of https://github.com/g4klx/MMDVMHost
permit inline comment
This commit is contained in:
parent
b57b781ab8
commit
e6d4bfe61c
9
Conf.cpp
9
Conf.cpp
|
|
@ -449,8 +449,15 @@ bool CConf::read()
|
||||||
value[len - 1U] = '\0';
|
value[len - 1U] = '\0';
|
||||||
value++;
|
value++;
|
||||||
} else {
|
} else {
|
||||||
|
char *p;
|
||||||
|
|
||||||
// if value is not quoted, remove after # (to make comment)
|
// if value is not quoted, remove after # (to make comment)
|
||||||
(void)::strtok(value, "#");
|
if ((p = strchr(value, '#')) != NULL)
|
||||||
|
*p = '\0';
|
||||||
|
|
||||||
|
// remove trailing tab/space
|
||||||
|
for (p = value + strlen(value) - 1U; p >= value && (*p == '\t' || *p == ' '); p--)
|
||||||
|
*p = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (section == SECTION_GENERAL) {
|
if (section == SECTION_GENERAL) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue