about summary refs log tree commit diff
path: root/mmime.c
diff options
context:
space:
mode:
Diffstat (limited to 'mmime.c')
-rw-r--r--mmime.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/mmime.c b/mmime.c
index 788f4bf..b499612 100644
--- a/mmime.c
+++ b/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;
+				}
 			}
 		}