From 1750b256ebaad1ba3444954ce9b231db2cd15387 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Wed, 11 May 2016 01:08:54 +0200 Subject: [PATCH] Do things right --- source/firm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/firm.c b/source/firm.c index 0994591..fc26900 100755 --- a/source/firm.c +++ b/source/firm.c @@ -372,10 +372,10 @@ static inline void reimplementSvcBackdoor(u8 *arm11Section1) if(svcTable[0x7B] != 0) return; 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++; - if(freeSpace >= exceptionsPage + 0x400) return; + if(freeSpace >= exceptionsPage + 0x400 - 0xA) return; //Official implementation of svcBackdoor freeSpace[0] = 0xE3CD10FF; //bic r1, sp, #0xff