mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-21 10:11:18 +00:00
Serial magic should only match on full match
As was mentioned on the wii dual layer disc issue, this line is comparing binary sequences as strings, which fails very obviously because neither of the 'strings' tested are strings and it's very likely both start with \0.
This commit is contained in:
parent
a3175a8fa3
commit
7da45bc789
@ -381,7 +381,7 @@ int detect_system(intfstream_t *fd, const char **system_name)
|
||||
if (read < MAGIC_LEN)
|
||||
continue;
|
||||
|
||||
if (string_is_equal(MAGIC_NUMBERS[i].magic, magic))
|
||||
if (memcmp(MAGIC_NUMBERS[i].magic, magic, MAGIC_LEN) == 0)
|
||||
{
|
||||
*system_name = MAGIC_NUMBERS[i].system_name;
|
||||
rv = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user