GBA: Fix Sharkport size check

This commit is contained in:
Vicki Pfau 2020-08-17 17:40:20 -07:00
parent a6885fdbd3
commit 37ef9c6d83
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ bool GBASavedataImportSharkPort(struct GBA* gba, struct VFile* vf, bool testChec
return false;
}
LOAD_32(size, 0, &buffer.i);
if (size < 0x1C || size >= SIZE_CART_FLASH1M + 0x1C) {
if (size < 0x1C || size > SIZE_CART_FLASH1M + 0x1C) {
return false;
}
char* payload = malloc(size);