aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-05 23:00:54 -0700
committerEric Wong <normalperson@yhbt.net>2008-09-05 23:05:52 -0700
commit28de5feab5392f0989633981c91e3131ca83427d (patch)
tree8f359bcbd00847d1fe58884b0dde38294d679b55 /src
parent9ff024638620a6b2ba9cdd77e7d7db68516ecdac (diff)
downloadmpd-28de5feab5392f0989633981c91e3131ca83427d.tar.gz
mpd-28de5feab5392f0989633981c91e3131ca83427d.tar.xz
mpd-28de5feab5392f0989633981c91e3131ca83427d.zip
tag: oops, of course items is now ** and not *
Gah, it seems like doing sizeof here either way is error prone. Too easy to leave out a '*' character we can forget.
Diffstat (limited to '')
-rw-r--r--src/tag.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tag.c b/src/tag.c
index 8208eb965..e5c306eb4 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -57,7 +57,7 @@ static mpd_sint8 ignoreTagItems[TAG_NUM_OF_ITEM_TYPES];
static size_t items_size(const struct mpd_tag *tag)
{
- return (tag->numOfItems * sizeof(struct tag_item));
+ return (tag->numOfItems * sizeof(struct tag_item *));
}
void tag_lib_init(void)
@@ -450,7 +450,7 @@ static void appendToTagItems(struct mpd_tag *tag, enum tag_type type,
tag->items = xmalloc(items_size(tag));
memcpy(tag->items, bulk.items,
- items_size(tag) - sizeof(struct tag_item));
+ items_size(tag) - sizeof(struct tag_item *));
}
pthread_mutex_lock(&tag_pool_lock);