# HG changeset patch # User Richard Laager # Date 1180921283 0 # Node ID 1aa324c47042bc1a0e05dab5aa7752658429c1b6 # Parent 582cf53510b9e4994a927e9fef2e8db0971924ea# Parent f94251004e7df3d6f0b4ca8cba692f0e76c0c008 merge of 'be9e03b2c65a8c0da6ba02fdfd489bc5ec8af57b' and 'c0d55a0b53b511c96041c3888b0803d549e4cdc4' diff -r 582cf53510b9 -r 1aa324c47042 libpurple/plugins/log_reader.c --- a/libpurple/plugins/log_reader.c Mon Jun 04 01:32:47 2007 +0000 +++ b/libpurple/plugins/log_reader.c Mon Jun 04 01:41:23 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);