Cleanup, use sizeof() for pattern memsearches

This commit is contained in:
Aurora
2016-09-03 15:35:46 +02:00
parent fc3a69d9ca
commit a2bca96d47
3 changed files with 21 additions and 21 deletions

View File

@@ -325,7 +325,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
case 0x000400300000B102LL: // TWN Menu
{
static const u8 regionFreePattern[] = {
0x00, 0x00, 0x55, 0xE3, 0x01, 0x10, 0xA0, 0xE3
0x00, 0x00, 0x55, 0xE3, 0x01, 0x10, 0xA0
};
static const u8 regionFreePatch[] = {
0x01, 0x00, 0xA0, 0xE3, 0x1E, 0xFF, 0x2F, 0xE1
@@ -384,7 +384,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
case 0x0004013000003202LL: // FRIENDS
{
static const u8 fpdVerPattern[] = {
0xE0, 0x1E, 0xFF, 0x2F, 0xE1, 0x01, 0x01, 0x01
0xE0, 0x1E, 0xFF, 0x2F, 0xE1, 0x01, 0x01
};
static const u8 mostRecentFpdVer = 0x06;
@@ -445,7 +445,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
if(cpuSetting)
{
static const u8 cfgN3dsCpuPattern[] = {
0x00, 0x40, 0xA0, 0xE1, 0x07, 0x00
0x00, 0x40, 0xA0, 0xE1, 0x07
};
u32 *cfgN3dsCpuLoc = (u32 *)memsearch(code, cfgN3dsCpuPattern, size, sizeof(cfgN3dsCpuPattern));
@@ -464,7 +464,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
case 0x0004013000001702LL: // CFG
{
static const u8 secureinfoSigCheckPattern[] = {
0x06, 0x46, 0x10, 0x48, 0xFC
0x06, 0x46, 0x10, 0x48
};
static const u8 secureinfoSigCheckPatch[] = {
0x00, 0x26