From 2243c16eddbbded3537556cac2e483baffb6edaa Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 28 Sep 2011 19:19:11 +0200 Subject: find_by_id: Fix lookup (v2) The offset should be taken from the (GList *)::data pointer, not the list directly.. v2: Drop accidentially commited wip stuff --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index a98731b..b2549af 100644 --- a/src/util.c +++ b/src/util.c @@ -8,7 +8,7 @@ cmumble_find_by_id(GList *list, gsize member_offset, guint id) GList *l; for (l = list; l; l = l->next) { - if (G_STRUCT_MEMBER(uint32_t, l, member_offset) == id) { + if (G_STRUCT_MEMBER(uint32_t, l->data, member_offset) == id) { el = l->data; break; } -- cgit