mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-03 15:40:32 +00:00
mmime: gen_build: don't crash on #-line without space
This commit is contained in:
parent
e531f43ad6
commit
0b2e4880f5
18
mmime.c
18
mmime.c
@ -301,14 +301,16 @@ gen_build()
|
||||
|
||||
if (!rflag && line[0] == '#') {
|
||||
char *f = strchr(line, ' ');
|
||||
*f = 0;
|
||||
if (strchr(line, '/')) {
|
||||
printf("\n--%s\n", sep);
|
||||
if (line[read-1] == '\n')
|
||||
line[read-1] = 0;
|
||||
gen_file(f+1, (char *)line+1);
|
||||
intext = 0;
|
||||
continue;
|
||||
if (f) {
|
||||
*f = 0;
|
||||
if (strchr(line, '/')) {
|
||||
printf("\n--%s\n", sep);
|
||||
if (line[read-1] == '\n')
|
||||
line[read-1] = 0;
|
||||
gen_file(f+1, (char *)line+1);
|
||||
intext = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user