aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-06-19 13:35:39 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-06-19 13:35:39 +0200
commit856883bf69bb54827c0854546131da39bef469f7 (patch)
tree351226da715f4ae19872f29ab5885e119155f39d
parentcbe0a0f9553efc3dfc0d4703107cc1d02cc2d06c (diff)
downloadmblaze-856883bf69bb54827c0854546131da39bef469f7.tar.gz
mdeliver: don't increment line buffer of getdelim
-rw-r--r--mdeliver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdeliver.c b/mdeliver.c
index 2d33ee3..6ac0f7e 100644
--- a/mdeliver.c
+++ b/mdeliver.c
@@ -105,6 +105,7 @@ tryagain:
return -1;
break;
}
+ char *line_start = line;
if (line[0] == '\n' && !line[1])
in_header = 0;
@@ -131,12 +132,12 @@ tryagain:
while (*s == '>')
s++;
if (strncmp("From ", s, 5) == 0) {
- line++;
+ line_start++;
rd--;
}
}
- if (fwrite(line, 1, rd, outfile) != (size_t)rd)
+ if (fwrite(line_start, 1, rd, outfile) != (size_t)rd)
return -1;
}
if (fflush(outfile) == EOF)