Fix a bug in tagcache tag length check, thanks to Rhino Banga.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16166 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Peter D'Hoye 2008-01-25 21:21:41 +00:00
parent 506d18b0e6
commit b4f80fb93f

View file

@ -1617,7 +1617,7 @@ static int check_if_empty(char **tag)
{
int length;
if (*tag == NULL || *tag[0] == '\0')
if (*tag == NULL || **tag == '\0')
{
*tag = UNTAGGED;
return sizeof(UNTAGGED); /* Tag length */
@ -1628,7 +1628,7 @@ static int check_if_empty(char **tag)
{
logf("over length tag: %s", *tag);
length = TAG_MAXLEN;
*tag[length] = '\0';
(*tag)[length] = '\0';
}
return length + 1;