Skip to content

Commit ca21186

Browse files
committed
Merge branch 'jt/mailinfo-fold-in-body-headers'
Fix for NDEBUG builds. * jt/mailinfo-fold-in-body-headers: mailinfo.c: move side-effects outside of assert
2 parents 49d45de + 0841493 commit ca21186

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mailinfo.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,8 @@ static void flush_inbody_header_accum(struct mailinfo *mi)
710710
{
711711
if (!mi->inbody_header_accum.len)
712712
return;
713-
assert(check_header(mi, &mi->inbody_header_accum, mi->s_hdr_data, 0));
713+
if (!check_header(mi, &mi->inbody_header_accum, mi->s_hdr_data, 0))
714+
die("BUG: inbody_header_accum, if not empty, must always contain a valid in-body header");
714715
strbuf_reset(&mi->inbody_header_accum);
715716
}
716717

0 commit comments

Comments
 (0)