# HG changeset patch # User Stu Tomlinson # Date 1180921578 0 # Node ID 3175a063aae1666ef262c5a1d14170f4de4866c9 # Parent 1aa324c47042bc1a0e05dab5aa7752658429c1b6# Parent fa5c24086481473c4aa0c84bfb0b8508efe865af merge of '1b4ebe4d8d8e94e998ce72e03c6bad7473803e28' and 'e0c7b2e82c91c8d337d3e0280a84ac2b43d90aa4' diff -r fa5c24086481 -r 3175a063aae1 libpurple/plugins/log_reader.c --- a/libpurple/plugins/log_reader.c Mon Jun 04 01:44:22 2007 +0000 +++ b/libpurple/plugins/log_reader.c Mon Jun 04 01:46:18 2007 +0000 @@ -1484,35 +1484,28 @@ * */ link_temp_line = NULL; - while ((link = g_strstr_len(line, strlen(line), "(Link: "))) { + while ((link = strstr(line, "(Link: "))) { GString *temp; - if (!*link) - continue; - *link = '\0'; - link++; - temp = g_string_new(line); g_string_append(temp, "= 6) { - link += (sizeof("(Link: ") - 1); - + link += (sizeof("(Link: ") - 1); + if (*link) { while (*link && *link != ')') { g_string_append_c(temp, *link); link++; } - if (link) { + if (*link) link++; - g_string_append(temp, "\">"); - while (*link && *link != ' ') { - g_string_append_c(temp, *link); - link++; - } - g_string_append(temp, ""); + g_string_append(temp, "\">"); + while (*link && *link != ' ') { + g_string_append_c(temp, *link); + link++; } + g_string_append(temp, ""); g_string_append(temp, link);