1
0
mirror of https://code.semirocket.science/wrapsix synced 2024-11-13 01:20:59 +02:00

Slightly better handling of incorrect config files

This commit is contained in:
xHire 2017-05-16 09:01:45 +02:00
parent be5743c099
commit 64907ebf5c

View File

@ -98,7 +98,7 @@ int cfg_parse(const char *config_file, unsigned short *cmtu,
/* comments */
if (c == '#') {
/* skip this line */
while (c = getc(f), c != '\n');
while (c = getc(f), c != '\n' && !feof(f));
continue;
}
@ -155,7 +155,7 @@ int cfg_parse(const char *config_file, unsigned short *cmtu,
/* skip rest of this line */
if (c != '\n') {
while (c = getc(f), c != '\n');
while (c = getc(f), c != '\n' && !feof(f));
}
/* recognize the option */