diff libpurple/protocols/qq/im.c @ 24925:1300601041ac

g_strsplit_set is new in glib 2.4 g_strv_length is new in glib 2.6 This is one reason I didn't get around to making RPMs for 2.5.3, I don't (yet) know if there are other glib version dependencies to deal with...
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 07 Jan 2009 01:15:36 +0000
parents 5ec72dbdd28e
children 9f1b9eff5ebc 94a6eb10c691
line wrap: on
line diff
--- a/libpurple/protocols/qq/im.c	Wed Jan 07 01:13:27 2009 +0000
+++ b/libpurple/protocols/qq/im.c	Wed Jan 07 01:15:36 2009 +0000
@@ -467,7 +467,10 @@
 	/* qq_show_packet("text", (guint8 *)text, strlen(text)); */
 	g_return_val_if_fail(text != NULL && strlen(text) != 0, g_strdup(""));
 
-	segments = g_strsplit_set(text, "\x14\x15", 0);
+	while ((cur = strchr(text, '\x14')) != NULL)
+		*cur = '\x15';
+
+	segments = g_strsplit(text, "\x15", 0);
 	if(segments == NULL) {
 		return g_strdup("");
 	}