Mercurial > pidgin
diff libpurple/plugins/log_reader.c @ 19114:6de2e9ba0930
merge of '2970edca111b3535ae0703e3c866ad1c3b87df94'
and 'a2b508e8680ac3f20965226a5dd83f7e2a3b15bb'
author | Eric Polino <aluink@pidgin.im> |
---|---|
date | Sun, 24 Jun 2007 02:56:09 +0000 |
parents | c0cd4d84ba52 |
children | 285779ebfe0b |
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c Sun Jun 24 02:55:54 2007 +0000 +++ b/libpurple/plugins/log_reader.c Sun Jun 24 02:56:09 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;