comparison src/protocols/irc/parse.c @ 10504:1a97d5e88d12

[gaim-migrate @ 11796] Lots of things here: - Several memory leak fixes - A few invalid memory access fixes - Fix a yahoo crash going idle when away - Fix Add user in chats to actually fill in the screenname - Add gaim_account_{get,set}_enabled to perl - Fix command priorities (fixes /me in IRC) - Fix MSN notification server transfer to be quiet about it - Fix MSN blist sync if user has insane friendly name - Make the docklet less crash-happy if it fails to embed in 3 seconds - Only probe for native plugins with the correct file extension - 1 typo fix :) ... and quite possibly something else I forgot. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 11 Jan 2005 17:25:06 +0000
parents dabcadc17ca0
children cdeb727d1de3
comparison
equal deleted inserted replaced
10503:776586d647e3 10504:1a97d5e88d12
233 int i; 233 int i;
234 234
235 enclist = gaim_account_get_string(irc->account, "encoding", IRC_DEFAULT_CHARSET); 235 enclist = gaim_account_get_string(irc->account, "encoding", IRC_DEFAULT_CHARSET);
236 encodings = g_strsplit(enclist, ",", -1); 236 encodings = g_strsplit(enclist, ",", -1);
237 237
238 if (encodings[0] == NULL) 238 if (encodings[0] == NULL) {
239 g_strfreev(encodings);
239 return gaim_utf8_salvage(string); 240 return gaim_utf8_salvage(string);
241 }
240 242
241 for (i = 0; encodings[i] != NULL; i++) { 243 for (i = 0; encodings[i] != NULL; i++) {
242 charset = encodings[i]; 244 charset = encodings[i];
243 while (*charset == ' ') 245 while (*charset == ' ')
244 charset++; 246 charset++;
253 if (utf8) { 255 if (utf8) {
254 g_strfreev(encodings); 256 g_strfreev(encodings);
255 return utf8; 257 return utf8;
256 } 258 }
257 } 259 }
260 g_strfreev(encodings);
258 261
259 return gaim_utf8_salvage(string); 262 return gaim_utf8_salvage(string);
260 } 263 }
261 264
262 /* XXX tag closings are not necessarily correctly nested here! If we 265 /* XXX tag closings are not necessarily correctly nested here! If we