fileio: pkg_fgetline(): handle comments properly

feature/tap-sh
William Pitcock 2015-04-20 09:24:07 -05:00
parent 1c1c7fcd8e
commit 5dc8aa361b
1 changed files with 7 additions and 0 deletions

View File

@ -34,7 +34,14 @@ pkg_fgetline(char *line, size_t size, FILE *stream)
quoted = true; quoted = true;
continue; continue;
} }
else if (c == '#')
{
if (!quoted)
break;
quoted = false;
continue;
}
else if (c == '\n') else if (c == '\n')
{ {
if (quoted) if (quoted)