diff --git a/injector/source/patcher.c b/injector/source/patcher.c index 40686c5..636e6ad 100644 --- a/injector/source/patcher.c +++ b/injector/source/patcher.c @@ -46,11 +46,9 @@ static u8 *memsearch(u8 *startPos, const void *pattern, u32 size, u32 patternSiz return NULL; } -static u32 patchMemory(u8 *start, u32 size, const void *pattern, u32 patSize, int offset, const void *replace, u32 repSize, u32 count) +static void patchMemory(u8 *start, u32 size, const void *pattern, u32 patSize, int offset, const void *replace, u32 repSize, u32 count) { - u32 i; - - for(i = 0; i < count; i++) + for(u32 i = 0; i < count; i++) { u8 *found = memsearch(start, pattern, size, patSize); @@ -65,8 +63,6 @@ static u32 patchMemory(u8 *start, u32 size, const void *pattern, u32 patSize, in size -= at + patSize; start = found + patSize; } - - return i; } static inline size_t strnlen(const char *string, size_t maxlen) diff --git a/loader/source/main.c b/loader/source/main.c index f6d9cae..b902b9d 100644 --- a/loader/source/main.c +++ b/loader/source/main.c @@ -29,9 +29,9 @@ void main(void) { void *payloadAddress = (void *)0x23F00000; - memcpy(payloadAddress, (void*)0x24F00000, payloadSize); + memcpy(payloadAddress, (void *)0x24F00000, payloadSize); flushCaches(); - + ((void (*)())payloadAddress)(); } \ No newline at end of file