Fix incorrect ROM size check
LoROMs have 32k (0x8000) banks, but the check required at least 64k.
This commit is contained in:
parent
3698bc2d2c
commit
54608e4a76
1 changed files with 2 additions and 3 deletions
5
main.c
5
main.c
|
@ -286,10 +286,9 @@ int main(int argc, char *argv[])
|
|||
|
||||
// Make sure the image is big enough
|
||||
|
||||
if (len < 0x10000 || (skip == 1 && len < 0x10200))
|
||||
if (len < 0x8000 || (skip == 1 && len < 0x8200))
|
||||
{
|
||||
printf("This file looks too small to be a rom image.\n");
|
||||
exit(1);
|
||||
printf("This file looks too small to be a legitimate rom image.\n");
|
||||
}
|
||||
|
||||
// Allocate mem for file. Extra 3 bytes to prevent segfault during memcpy
|
||||
|
|
Loading…
Reference in a new issue