loosen the partition table white list, as samples shown in #2

This commit is contained in:
JimmyZ 2017-10-07 18:59:05 +08:00
parent dafd6b087e
commit fba8429db3
2 changed files with 4 additions and 3 deletions

View File

@ -10,7 +10,7 @@ include $(DEVKITARM)/ds_rules
export TARGET := twlnf
export TOPDIR := $(CURDIR)
export VERSION := 0.3.1
export VERSION := 0.3.1a
.PHONY: arm7/$(TARGET).elf arm9/$(TARGET).elf

View File

@ -91,8 +91,9 @@ int parse_mbr(const uint8_t sector0[SECTOR_SIZE], int is3DS, int verbose) {
} else {
ref_ptable = ptable_3DS;
}
if (memcmp(ref_ptable, sector0 + MBR_BOOTSTRAP_SIZE,
sizeof(mbr_partition_t) * MBR_PARTITIONS)) {
// only test the 1st partition now, we've seen variations on the 3rd partition
// and after all we only care about the 1st partition
if (memcmp(ref_ptable, m->partitions, sizeof(mbr_partition_t))) {
prt("invalid partition table\n");
ret = -2;
}