diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-01-17 15:11:06 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-17 15:11:06 -0800 |
commit | 943c9a7b867210f283d588e1b790d0197b66fde8 (patch) | |
tree | ba347600b2613461d0691d965215de3b054a9fca | |
parent | Merge branch 'jk/index-pack-wo-repo-from-stdin' into maint (diff) | |
parent | mailinfo.c: move side-effects outside of assert (diff) | |
download | tgif-943c9a7b867210f283d588e1b790d0197b66fde8.tar.xz |
Merge branch 'jt/mailinfo-fold-in-body-headers' into maint
Fix for NDEBUG builds.
* jt/mailinfo-fold-in-body-headers:
mailinfo.c: move side-effects outside of assert
-rw-r--r-- | mailinfo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mailinfo.c b/mailinfo.c index 2fb3877ee4..a489d9d0fb 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -710,7 +710,8 @@ static void flush_inbody_header_accum(struct mailinfo *mi) { if (!mi->inbody_header_accum.len) return; - assert(check_header(mi, &mi->inbody_header_accum, mi->s_hdr_data, 0)); + if (!check_header(mi, &mi->inbody_header_accum, mi->s_hdr_data, 0)) + die("BUG: inbody_header_accum, if not empty, must always contain a valid in-body header"); strbuf_reset(&mi->inbody_header_accum); } |