Skip to content

Commit

Permalink
loosen the partition table white list, as samples shown in #2
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyZ authored and JimmyZ committed Oct 7, 2017
1 parent dafd6b0 commit fba8429
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions arm9/source/sector0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fba8429

Please sign in to comment.