Fix data aborts on TWL MBR writes

This commit is contained in:
d0k3 2017-06-21 12:55:36 +02:00
parent 1ebfd74aa4
commit c240f3463d

View File

@ -281,7 +281,7 @@ int WriteNandBytes(const void* buffer, u64 offset, u64 count, u32 keyslot, u32 n
// simple wrapper function for WriteNandSectors(...) // simple wrapper function for WriteNandSectors(...)
return WriteNandSectors(buffer, offset / 0x200, count / 0x200, keyslot, nand_dst); return WriteNandSectors(buffer, offset / 0x200, count / 0x200, keyslot, nand_dst);
} else { // misaligned data -> -___- } else { // misaligned data -> -___-
u8* buffer8 = (u8*) buffer8; u8* buffer8 = (u8*) buffer;
u8 l_buffer[0x200]; u8 l_buffer[0x200];
int errorcode = 0; int errorcode = 0;
if (offset % 0x200) { // handle misaligned offset if (offset % 0x200) { // handle misaligned offset