* decoding may have concatenated lines. */
if (chflags & (CH_DECODE | CH_PREFIX))
{
- if (mutt_write_one_header(
- fp_out, 0, headers[x], (chflags & CH_PREFIX) ? prefix : 0,
- mutt_window_wrap_cols(MuttIndexWindow, C_Wrap), chflags) == -1)
+ const char *pre = (chflags & CH_PREFIX) ? prefix : NULL;
+ const int wraplen = mutt_window_wrap_cols(MuttIndexWindow, C_Wrap);
+
+ if (mutt_write_one_header(fp_out, 0, headers[x], pre, wraplen, chflags) == -1)
{
error = true;
break;