From 893345bb86edd1ab8299bdcb8ffadedc6e114710 Mon Sep 17 00:00:00 2001 From: "Steffen (Daode) Nurpmeso" Date: Mon, 2 Jan 2017 13:57:39 +0100 Subject: [PATCH] FIX [1e5697d6] as of -12-22!.. Yes, it is a much better strategy to do so, but that does not mean that all messages come with a charset= parameter. Please do not crash, shall that happen. --- cmd_resend.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd_resend.c b/cmd_resend.c index 055c094a4..095306915 100644 --- a/cmd_resend.c +++ b/cmd_resend.c @@ -147,11 +147,12 @@ make_ref_and_cs(struct message *mp, struct header *head) /* TODO rewrite FAST */ head->h_ref = n; if (ok_blook(reply_in_same_charset) && (cp = hfield1("content-type", mp)) != NULL){ - char *cpo, c; + if((head->h_charset = cp = mime_param_get("charset", cp)) != NULL){ + char *cpo, c; - head->h_charset = cp = mime_param_get("charset", cp); - for(cpo = cp; (c = *cpo) != '\0'; ++cpo) - *cpo = lowerconv(c); + for(cpo = cp; (c = *cpo) != '\0'; ++cpo) + *cpo = lowerconv(c); + } } jleave: NYD_LEAVE; -- 2.11.4.GIT