Fix installing FIRMs

This commit is contained in:
d0k3 2019-10-04 18:26:08 +02:00
parent 760052f20d
commit 5799d99c4c
2 changed files with 3 additions and 3 deletions

View File

@ -106,8 +106,8 @@ u32 ValidateFirm(void* firm, u32 firm_size, bool installable) {
if (resv[0x2D] == 'B' && resv[0x2E] == '9' && resv[0x2F] == 'S') if (resv[0x2D] == 'B' && resv[0x2E] == '9' && resv[0x2F] == 'S')
skipchk_mask |= BIT(3); skipchk_mask |= BIT(3);
if ((header->sections[1].size = 0x200) && if ((header->sections[1].size == 0x200) &&
(header->sections[1].address = 0x07FFFE8C)) (header->sections[1].address == 0x07FFFE8C))
skipchk_mask |= BIT(1); skipchk_mask |= BIT(1);
} }

View File

@ -637,7 +637,7 @@ u32 VerifyFirmFile(const char* path) {
// hash verify all available sections // hash verify all available sections
FirmHeader header; FirmHeader header;
memcpy(&header, firm_buffer, sizeof(FirmHeader)); memcpy(&header, firm_buffer, sizeof(FirmHeader));
for (u32 i = 0; i < 4; i++) { for (u32 i = 0; i < 4; i++) {
FirmSectionHeader* sct = header.sections + i; FirmSectionHeader* sct = header.sections + i;
void* section = ((u8*) firm_buffer) + sct->offset; void* section = ((u8*) firm_buffer) + sct->offset;
if (!(sct->size)) continue; if (!(sct->size)) continue;