diff src/util.c @ 10623:14c32196fcfd

[gaim-migrate @ 12094] The logic I used for dragging buddies and expanding them was so flawed it floored me. People probably prefer it like this. Also fix up body tags with bgcolors. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 22 Feb 2005 16:06:29 +0000
parents 522b719ea774
children 0f5c5e6fb27f
line wrap: on
line diff
--- a/src/util.c	Tue Feb 22 15:16:56 2005 +0000
+++ b/src/util.c	Tue Feb 22 16:06:29 2005 +0000
@@ -1122,7 +1122,10 @@
 							}
 							g_string_append_printf(xhtml, "<span style='background: %s;'>", color->str);
 							g_string_free(color, TRUE);
-							c = strchr(c, '>') + 1;
+							if ((c = strchr(c, '>')) != NULL)
+								c++;
+							else
+								c = p;
 							pt->src_tag = "body";
 							pt->dest_tag = "span";
 							tags = g_list_prepend(tags, pt);
@@ -2763,6 +2766,9 @@
 		if (end == NULL)
 			end = strchr(s, '\n');
 
+		if (end == NULL)
+			return FALSE;
+
 		len = end - s;
 
 		new_url = g_malloc(len + 1);