Hack to prevent stack checker from alerting

This commit is contained in:
Henrik Rydgard committed 2012-11-06 15:46:00 +01:00
1 parent d086c18db7
commit 91eeed6408
1 file changed
+5 -1
+5 -1
View File
@@ -575,6 +575,11 @@ static TAG_INFO2 *GetTagInfo2(u32 tagFind)
return NULL; // not found
}
// Moving these out here is a really ugly hack to avoid a stack corruption warning, warranted or not
static u8 padding1[0x100];
static u8 tmp1[0x150], tmp2[0x90+0x14], tmp3[0x60+0x14], tmp4[0x20];
static u8 padding2[0x100];
static int DecryptPRX2(const u8 *inbuf, u8 *outbuf, u32 size, u32 tag)
{
TAG_INFO2 * pti = GetTagInfo2(tag);
@@ -585,7 +590,6 @@ static int DecryptPRX2(const u8 *inbuf, u8 *outbuf, u32 size, u32 tag)
}
int retsize = *(int *)&inbuf[0xB0];
u8 tmp1[0x150], tmp2[0x90+0x14], tmp3[0x60+0x14], tmp4[0x20];
memset(tmp1, 0, 0x150);
memset(tmp2, 0, 0x90+0x14);