diff options
| author | Junio C Hamano <gitster@pobox.com> | 2008-08-19 00:40:53 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2008-08-19 00:40:53 -0700 |
| commit | c6670b348cb19c74a6d7f6943df4871eb0d8295f (patch) | |
| tree | efb4f9ff112962f11197fb8250261061f58bea39 /builtin-mailinfo.c | |
| parent | Start 1.6.1 cycle (diff) | |
| parent | t1002-read-tree-m-u-2way.sh: use 'git diff -U0' rather than 'diff -U0' (diff) | |
| download | git-c6670b348cb19c74a6d7f6943df4871eb0d8295f.tar.gz git-c6670b348cb19c74a6d7f6943df4871eb0d8295f.zip | |
Merge branch 'maint'
* maint:
t1002-read-tree-m-u-2way.sh: use 'git diff -U0' rather than 'diff -U0'
adapt git-cvsserver manpage to dash-free syntax
mailinfo: re-fix MIME multipart boundary parsing
Diffstat (limited to 'builtin-mailinfo.c')
| -rw-r--r-- | builtin-mailinfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c index 3577382d70..26d3e5d7af 100644 --- a/builtin-mailinfo.c +++ b/builtin-mailinfo.c @@ -175,7 +175,7 @@ static void handle_content_type(struct strbuf *line) message_type = TYPE_OTHER; if (slurp_attr(line->buf, "boundary=", boundary)) { strbuf_insert(boundary, 0, "--", 2); - if (content_top++ >= &content[MAX_BOUNDARIES]) { + if (++content_top > &content[MAX_BOUNDARIES]) { fprintf(stderr, "Too many boundaries to handle\n"); exit(1); } @@ -603,7 +603,7 @@ static void handle_filter(struct strbuf *line); static int find_boundary(void) { while (!strbuf_getline(&line, fin, '\n')) { - if (is_multipart_boundary(&line)) + if (*content_top && is_multipart_boundary(&line)) return 1; } return 0; @@ -626,7 +626,7 @@ again: /* technically won't happen as is_multipart_boundary() will fail first. But just in case.. */ - if (content_top-- < content) { + if (--content_top < content) { fprintf(stderr, "Detected mismatched boundaries, " "can't recover\n"); exit(1); |
