More robust comment processing
This commit is contained in:
parent
54e2e09c5c
commit
f9cb2d544a
|
@ -580,8 +580,16 @@ int readFile(const char *filename, struct Environment *env) {
|
|||
}
|
||||
}
|
||||
while(fgets(line, 256, input)) {
|
||||
if(line[0] != ';') {
|
||||
strncat(page, line, strlen(line) - 1);
|
||||
int i;
|
||||
for(i = 0; i < 256; i++) {
|
||||
if(line[i] != ' ') {
|
||||
if(line[i] == ';') {
|
||||
break;
|
||||
} else {
|
||||
strncat(page, line, strlen(line) - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue