comparison libpurple/protocols/msn/slpcall.c @ 28431:500d1e806264

So apparently, I messed up the name of this charset. But I wonder why it never crashed when I tested it. Also, GError's hate when you overwrite them, so initialize error to NULL. Fixes #10048.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 24 Aug 2009 01:39:31 +0000
parents 0cd438c47ab3
children 59b0c556f787
comparison
equal deleted inserted replaced
28430:9d620811c67c 28431:500d1e806264
203 char *body_str; 203 char *body_str;
204 204
205 if (slpmsg->session_id == 64) 205 if (slpmsg->session_id == 64)
206 { 206 {
207 /* This is for handwritten messages (Ink) */ 207 /* This is for handwritten messages (Ink) */
208 GError *error; 208 GError *error = NULL;
209 gsize bytes_read, bytes_written; 209 gsize bytes_read, bytes_written;
210 210
211 body_str = g_convert((const gchar *)body, body_len / 2, 211 body_str = g_convert((const gchar *)body, body_len / 2,
212 "UTF-8", "UTF-16LE", 212 "UTF-8", "UTF-16LE",
213 &bytes_read, &bytes_written, &error); 213 &bytes_read, &bytes_written, &error);
230 return NULL; 230 return NULL;
231 } 231 }
232 g_free(body_str); 232 g_free(body_str);
233 233
234 body_str = g_convert((const gchar *)body, body_len / 2, 234 body_str = g_convert((const gchar *)body, body_len / 2,
235 "UTF-8", "UTF16-LE", 235 "UTF-8", "UTF-16LE",
236 &bytes_read, &bytes_written, &error); 236 &bytes_read, &bytes_written, &error);
237 if (!body_str) 237 if (!body_str)
238 { 238 {
239 if (error != NULL) { 239 if (error != NULL) {
240 purple_debug_error("msn", 240 purple_debug_error("msn",