libpurple/plugins/log_reader.c

changeset 18502
6b54bf11ae1e
parent 18501
54813e019a76
child 18503
2cda7502306c
--- a/libpurple/plugins/log_reader.c	Sun Jun 17 21:03:22 2007 +0000
+++ b/libpurple/plugins/log_reader.c	Mon Jun 18 20:51:29 2007 +0000
@@ -1970,8 +1970,11 @@
 			/* XXX: Do we need buddy_name when we have buddy->alias? */
 			buddy_name = ++c;
 			
-			/* we hope that nickname hasn't '(' symbol */
-			c = strstr(c, "(");
+
+			/* searching '(' character from the end of the line */
+			c = strstr(c, "\n");
+			while (*c && *c != '(')
+				--c;
 
 			if (*c == '(') {
 				const char *timestamp = c;

mercurial