Mercurial > pidgin
comparison libpurple/plugins/log_reader.c @ 18108:c0cd4d84ba52
Fix a mistake noticed by Michael Shkutkov and add a comment explaining the code.
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Sat, 16 Jun 2007 02:21:13 +0000 |
| parents | 21773944db4b |
| children | 285779ebfe0b |
comparison
equal
deleted
inserted
replaced
| 18107:d865909b6646 | 18108:c0cd4d84ba52 |
|---|---|
| 1288 | 1288 |
| 1289 trillian_logger_finalize((PurpleLog *)last->data); | 1289 trillian_logger_finalize((PurpleLog *)last->data); |
| 1290 list = g_list_delete_link(list, last); | 1290 list = g_list_delete_link(list, last); |
| 1291 } | 1291 } |
| 1292 } | 1292 } |
| 1293 } else if (line[0] && line[1] && line [3] && | 1293 } else if (line[0] && line[1] && line[2] && |
| 1294 purple_str_has_prefix(&line[3], "sion Start ")) { | 1294 purple_str_has_prefix(&line[3], "sion Start ")) { |
| 1295 | 1295 /* The conditional is to make sure we're not reading off |
| 1296 * the end of the string. We don't want strlen(), as that'd | |
| 1297 * have to count the whole string needlessly. | |
| 1298 * | |
| 1299 * The odd check here is because a Session Start at the | |
| 1300 * beginning of the file can be overwritten with a UTF-8 | |
| 1301 * byte order mark. Yes, it's weird. | |
| 1302 */ | |
| 1296 char *their_nickname = line; | 1303 char *their_nickname = line; |
| 1297 char *timestamp; | 1304 char *timestamp; |
| 1298 | 1305 |
| 1299 if (data && !data->length) | 1306 if (data && !data->length) |
| 1300 data->length = last_line_offset - data->offset; | 1307 data->length = last_line_offset - data->offset; |
