forked from ariadne/pkgconf
fileio: Skip the whole line after a non quoted comment
parent
1dc28ba666
commit
0eb31f91ee
9
fileio.c
9
fileio.c
|
@ -36,9 +36,14 @@ pkg_fgetline(char *line, size_t size, FILE *stream)
|
||||||
}
|
}
|
||||||
else if (c == '#')
|
else if (c == '#')
|
||||||
{
|
{
|
||||||
if (!quoted)
|
if (!quoted) {
|
||||||
|
/* Skip the rest of the line */
|
||||||
|
do {
|
||||||
|
c = getc(stream);
|
||||||
|
} while (c != '\n' && c != EOF);
|
||||||
|
*s++ = c;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
quoted = false;
|
quoted = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue