Commit a5f68b3c authored by Eric Wong's avatar Eric Wong Committed by Max Kellermann

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.
parent 3c4de5b5
...@@ -57,7 +57,7 @@ mpd_sint8 ignoreTagItems[TAG_NUM_OF_ITEM_TYPES]; ...@@ -57,7 +57,7 @@ mpd_sint8 ignoreTagItems[TAG_NUM_OF_ITEM_TYPES];
static size_t items_size(const struct tag *tag) static size_t items_size(const struct tag *tag)
{ {
return (tag->numOfItems * sizeof(struct tag_item)); return (tag->numOfItems * sizeof(struct tag_item *));
} }
void tag_lib_init(void) void tag_lib_init(void)
...@@ -427,7 +427,7 @@ static void appendToTagItems(struct tag *tag, enum tag_type type, ...@@ -427,7 +427,7 @@ static void appendToTagItems(struct tag *tag, enum tag_type type,
tag->items = xmalloc(items_size(tag)); tag->items = xmalloc(items_size(tag));
memcpy(tag->items, bulk.items, 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); pthread_mutex_lock(&tag_pool_lock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment