From de026dcedefec81b585a7e00a06712273d57ea64 Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Wed, 16 Apr 2008 16:18:05 +0000 Subject: Fix FS#8902 (NSF files get skipped). The cause was too strict metadata checking (the NSF metadata parser doesn't fill the 'length' field). Hopefully there won't be any problems with that anymore. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17142 a1c6a512-1295-4272-9138-f99709370657 --- apps/buffering.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/buffering.c') diff --git a/apps/buffering.c b/apps/buffering.c index 113650f..9dafa67 100644 --- a/apps/buffering.c +++ b/apps/buffering.c @@ -589,7 +589,11 @@ static bool buffer_handle(int handle_id) if (h->type == TYPE_ID3) { - get_metadata((struct mp3entry *)(buffer + h->data), h->fd, h->path); + if (!get_metadata((struct mp3entry *)(buffer + h->data), h->fd, h->path)) + { + /* metadata parsing failed: clear the buffer. */ + memset(buffer + h->data, 0, sizeof(struct mp3entry)); + } close(h->fd); h->fd = -1; h->filerem = 0; -- cgit v1.1