Mercurial > pidgin
diff libpurple/plugins/log_reader.c @ 18168:285779ebfe0b
propagate from branch 'im.pidgin.pidgin' (head f61e46616c5562046a9f89a538ae10f5e5ef29ae)
to branch 'im.pidgin.soc.2007.remotelogging' (head c8ca0bef43c668d71394e63296b0a07fd0496e59)
author | Michael Shkutkov <mshkutkov@soc.pidgin.im> |
---|---|
date | Sun, 17 Jun 2007 21:03:22 +0000 |
parents | b5e9a814b711 c0cd4d84ba52 |
children | e9d751afc90b |
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c Sat Jun 16 05:42:29 2007 +0000 +++ b/libpurple/plugins/log_reader.c Sun Jun 17 21:03:22 2007 +0000 @@ -1290,9 +1290,16 @@ list = g_list_delete_link(list, last); } } - } else if (line[0] && line[1] && line [3] && + } else if (line[0] && line[1] && line[2] && purple_str_has_prefix(&line[3], "sion Start ")) { - + /* The conditional is to make sure we're not reading off + * the end of the string. We don't want strlen(), as that'd + * have to count the whole string needlessly. + * + * The odd check here is because a Session Start at the + * beginning of the file can be overwritten with a UTF-8 + * byte order mark. Yes, it's weird. + */ char *their_nickname = line; char *timestamp;