Skip to content

Commit fba8429

Browse files
JimmyZJimmyZ
authored andcommitted
loosen the partition table white list, as samples shown in #2
1 parent dafd6b0 commit fba8429

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include $(DEVKITARM)/ds_rules
1010
export TARGET := twlnf
1111
export TOPDIR := $(CURDIR)
1212

13-
export VERSION := 0.3.1
13+
export VERSION := 0.3.1a
1414

1515
.PHONY: arm7/$(TARGET).elf arm9/$(TARGET).elf
1616

arm9/source/sector0.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ int parse_mbr(const uint8_t sector0[SECTOR_SIZE], int is3DS, int verbose) {
9191
} else {
9292
ref_ptable = ptable_3DS;
9393
}
94-
if (memcmp(ref_ptable, sector0 + MBR_BOOTSTRAP_SIZE,
95-
sizeof(mbr_partition_t) * MBR_PARTITIONS)) {
94+
// only test the 1st partition now, we've seen variations on the 3rd partition
95+
// and after all we only care about the 1st partition
96+
if (memcmp(ref_ptable, m->partitions, sizeof(mbr_partition_t))) {
9697
prt("invalid partition table\n");
9798
ret = -2;
9899
}

0 commit comments

Comments
 (0)