Fix bad trimming of certain NDS dumps

Fixes #763
This commit is contained in:
d0k3 2022-03-08 18:47:32 +01:00
parent 586d30fafa
commit d95a606ec2

View File

@ -3294,7 +3294,8 @@ u64 GetGameFileTrimmedSize(const char* path) {
return 0;
if (hdr.unit_code != 0x00) // DSi or NDS+DSi
trimsize = hdr.ntr_twl_rom_size;
else trimsize = hdr.ntr_rom_size + 0x88; // regular NDS
else if (hdr.ntr_rom_size) // regular NDS
trimsize = hdr.ntr_rom_size + 0x88;
} else {
u8 hdr[0x200];
if (fvx_qread(path, &hdr, 0, 0x200, NULL) != FR_OK)