sbtoelf: don't cross check if key is not valid

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30834 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Amaury Pouly 2011-10-23 18:19:21 +00:00
parent cab5dbded9
commit f45fb77664

View file

@ -538,15 +538,18 @@ static void extract(unsigned long filesize)
/* cross-check or copy */
if(valid_key && ok)
memcpy(real_key, decrypted_key, 16);
else if(valid_key && memcmp(real_key, decrypted_key, 16) == 0)
else if(valid_key)
{
color(RED);
printf(" Cross-Check Ok");
}
else
{
color(RED);
printf(" Cross-Check Failed");
if(memcmp(real_key, decrypted_key, 16) == 0)
{
color(RED);
printf(" Cross-Check Ok");
}
else
{
color(RED);
printf(" Cross-Check Failed");
}
}
printf("\n");
}