comparison mp_msg.c @ 22006:b79ca70e0cad

Handle mp_msg_charset == NULL correctly in filename_recode. Patch by Vladimir Voroshilov - voroshil gmail com
author reimar
date Sat, 27 Jan 2007 10:11:40 +0000
parents 77c4ad229db6
children 56a0b0f8a66e
comparison
equal deleted inserted replaced
22005:77c4ad229db6 22006:b79ca70e0cad
46 #else 46 #else
47 static iconv_t inv_msgiconv = (iconv_t)(-1); 47 static iconv_t inv_msgiconv = (iconv_t)(-1);
48 static char recoded_filename[MSGSIZE_MAX]; 48 static char recoded_filename[MSGSIZE_MAX];
49 size_t filename_len, max_path; 49 size_t filename_len, max_path;
50 char* precoded; 50 char* precoded;
51 if (!strcasecmp(mp_msg_charset, MSG_CHARSET) || 51 if (!mp_msg_charset ||
52 !strcasecmp(mp_msg_charset, MSG_CHARSET) ||
52 !strcasecmp(mp_msg_charset, "noconv")) 53 !strcasecmp(mp_msg_charset, "noconv"))
53 return filename; 54 return filename;
54 if (inv_msgiconv == (iconv_t)(-1)) { 55 if (inv_msgiconv == (iconv_t)(-1)) {
55 inv_msgiconv = iconv_open(MSG_CHARSET, mp_msg_charset); 56 inv_msgiconv = iconv_open(MSG_CHARSET, mp_msg_charset);
56 if (inv_msgiconv == (iconv_t)(-1)) 57 if (inv_msgiconv == (iconv_t)(-1))