mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Skip comment lines in config file starting with '#' or ';' correctly
SVN revision: 1745
This commit is contained in:
parent
8d782aa686
commit
e8a8c76860
@ -2806,7 +2806,11 @@ int parse_config_file(char *file_name)
|
||||
p = buffer;
|
||||
index = 0;
|
||||
do {
|
||||
if (*p == '[') {
|
||||
if (*p == '#' || *p == ';') {
|
||||
/* skip comment */
|
||||
while (*p && *p != '\n' && *p != '\r')
|
||||
p++;
|
||||
} else if (*p == '[') {
|
||||
p++;
|
||||
pstr = str;
|
||||
while (*p && *p != ']' && *p != '\n' && *p != '\r' && pstr - str < 10000)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user