src/protocols/irc/irc.c

changeset 12752
612eb998c9b5
parent 12658
4aa7a873628d
child 13201
8c224ef70efa
--- a/src/protocols/irc/irc.c	Sat Jan 07 08:16:44 2006 +0000
+++ b/src/protocols/irc/irc.c	Sat Jan 07 16:32:18 2006 +0000
@@ -488,6 +488,13 @@
 	irc->inbuf[irc->inbufused] = '\0';
 
 	cur = irc->inbuf;
+	
+	/* This is a hack to work around the fact that marv gets messages
+	 * with null bytes in them while using some weird irc server at work
+	 */
+	while ((cur < (irc->inbuf + irc->inbufused)) && !*cur)
+		cur++;
+	
 	while (cur < irc->inbuf + irc->inbufused &&
 	       ((end = strstr(cur, "\r\n")) || (end = strstr(cur, "\n")))) {
 		int step = (*end == '\r' ? 2 : 1);

mercurial