# HG changeset patch # User Sadrul Habib Chowdhury # Date 1195681617 0 # Node ID 738cbb49da7c2ebd57e08c4af25f40232f42aa1e # Parent 5c74661025dc443071386224e5f732c9a0fd668d# Parent 47b2074a55d8bcfe5d9caee6380465975d00ac1c merge of '1d074784ebb62d1f8c06d80074ca8cab61c2d346' and '292f199c8c7cd18420a26459400e95f53fbab171' diff -r 47b2074a55d8 -r 738cbb49da7c libpurple/protocols/yahoo/yahoo_packet.c --- a/libpurple/protocols/yahoo/yahoo_packet.c Wed Nov 21 15:00:17 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_packet.c Wed Nov 21 21:46:57 2007 +0000 @@ -219,15 +219,16 @@ void yahoo_packet_write(struct yahoo_packet *pkt, guchar *data) { + GSList *l = pkt->hash; int pos = 0; /* This is only called from one place, and the list is * always backwards */ - pkt->hash = g_slist_reverse(pkt->hash); + l = g_slist_reverse(l); - while (pkt->hash) { - struct yahoo_pair *pair = pkt->hash->data; + while (l) { + struct yahoo_pair *pair = l->data; gchar buf[100]; g_snprintf(buf, sizeof(buf), "%d", pair->key); @@ -241,7 +242,7 @@ data[pos++] = 0xc0; data[pos++] = 0x80; - pkt->hash = pkt->hash->next; + l = l->next; } }