comparison libpurple/protocols/jabber/presence.c @ 28729:4ab6f0479bc5

strchr() is safe when searching for an ASCII character in UTF8 strings.
author Paul Aurich <paul@darkrain42.org>
date Tue, 01 Dec 2009 16:46:57 +0000
parents cfca0217d162
children f267c1608102
comparison
equal deleted inserted replaced
28727:6ebacc1710b2 28729:4ab6f0479bc5
431 static void 431 static void
432 jabber_presence_set_capabilities(JabberCapsClientInfo *info, GList *exts, 432 jabber_presence_set_capabilities(JabberCapsClientInfo *info, GList *exts,
433 JabberPresenceCapabilities *userdata) 433 JabberPresenceCapabilities *userdata)
434 { 434 {
435 JabberBuddyResource *jbr; 435 JabberBuddyResource *jbr;
436 char *resource = g_utf8_strchr(userdata->from, -1, '/'); 436 char *resource = strchr(userdata->from, '/');
437 437
438 if (resource) 438 if (resource)
439 resource += 1; 439 resource += 1;
440 440
441 jbr = jabber_buddy_find_resource(userdata->jb, resource); 441 jbr = jabber_buddy_find_resource(userdata->jb, resource);