Logic was backwards on the check for NSF file format. Fix that and save one memcmp.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22559 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f701fc5166
commit
ad9835c689
1 changed files with 8 additions and 5 deletions
|
@ -28,14 +28,17 @@ bool get_nsf_metadata(int fd, struct mp3entry* id3)
|
|||
id3->vbr = false;
|
||||
id3->filesize = filesize(fd);
|
||||
|
||||
if (memcmp(buf,"NESM",4) && memcmp(buf,"NSFE",4))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (memcmp(buf, "NESM",4)) /* only NESM contain metadata */
|
||||
if (memcmp(buf,"NSFE",4) == 0) /* only NESM contain metadata */
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (memcmp(buf, "NESM",4) != 0) /* not a valid format*/
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
p = id3->id3v2buf;
|
||||
|
||||
|
|
Loading…
Reference in a new issue