Do things right

This commit is contained in:
TuxSH 2016-05-11 01:08:54 +02:00
parent d00d82ac89
commit 1750b256eb

View File

@ -372,10 +372,10 @@ static inline void reimplementSvcBackdoor(u8 *arm11Section1)
if(svcTable[0x7B] != 0) return; if(svcTable[0x7B] != 0) return;
u32 *freeSpace = exceptionsPage; u32 *freeSpace = exceptionsPage;
while(freeSpace < exceptionsPage + 0x400 && (freeSpace[0] != 0xFFFFFFFF || freeSpace[1] != 0xFFFFFFFF)) while(freeSpace < exceptionsPage + 0x400 - 0xA && (freeSpace[0] != 0xFFFFFFFF || freeSpace[1] != 0xFFFFFFFF))
freeSpace++; freeSpace++;
if(freeSpace >= exceptionsPage + 0x400) return; if(freeSpace >= exceptionsPage + 0x400 - 0xA) return;
//Official implementation of svcBackdoor //Official implementation of svcBackdoor
freeSpace[0] = 0xE3CD10FF; //bic r1, sp, #0xff freeSpace[0] = 0xE3CD10FF; //bic r1, sp, #0xff