Mercurial > pidgin.yaz
changeset 18169:e9d751afc90b
reverse searching of '(' character
author | Michael Shkutkov <mshkutkov@soc.pidgin.im> |
---|---|
date | Mon, 18 Jun 2007 20:51:29 +0000 |
parents | 285779ebfe0b |
children | 179bb0ea89c7 |
files | libpurple/plugins/log_reader.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;