X-Git-Url: https://git.toastfreeware.priv.at/gregoa/bti.git/blobdiff_plain/fdcbba2bd97ac1bb512f820755602afc8a1e7c7e..d20c2ca45742deb99e874071a175b29d6c5f9857:/config.c diff --git a/config.c b/config.c index 42a0384..e06f480 100644 --- a/config.c +++ b/config.c @@ -355,9 +355,18 @@ void bti_parse_configfile(struct session *session) if (line == hashmarker) line[0] = '\0'; else { - --hashmarker; - if (isblank(hashmarker[0])) - hashmarker[0] = '\0'; + while (hashmarker[0] != '\0') { + --hashmarker; + if (isblank(hashmarker[0])) + hashmarker[0] = '\0'; + else { + /* + * false positive; '#' occured + * within a string + */ + hashmarker = strchrnul(hashmarker+2, '#'); + } + } } c = line; while (isspace(*c))