From d852091446f41b56c10a4163c9d00dd90eb2bc1b Mon Sep 17 00:00:00 2001 From: Eric Gillespie Date: Thu, 14 Aug 2008 06:19:08 +0000 Subject: [PATCH] This is what happens with last-minute "safe" improvements: actually point chset to something in the new merged InitText! --- uip/mhparse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/uip/mhparse.c b/uip/mhparse.c index f5ff85c..7c10000 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -1058,7 +1058,7 @@ static int InitText (CT ct) { char buffer[BUFSIZ]; - char *chset; + char *chset = NULL; char **ap, **ep, *cp; struct k2v *kv; struct text *t; @@ -1087,9 +1087,12 @@ InitText (CT ct) /* check if content specified a character set */ if (*ap) { /* match character set or set to CHARSET_UNKNOWN */ - for (kv = Charset; kv->kv_key; kv++) - if (!mh_strcasecmp (*ep, kv->kv_key)) + for (kv = Charset; kv->kv_key; kv++) { + if (!mh_strcasecmp (*ep, kv->kv_key)) { + chset = *ep; break; + } + } t->tx_charset = kv->kv_value; } else { t->tx_charset = CHARSET_UNSPECIFIED; -- 1.7.10.4