Fix range checks
This commit is contained in:
parent
3e67e64faa
commit
1de27c54f1
@ -120,11 +120,11 @@ char failureReason[64];
|
|||||||
|
|
||||||
static bool Cheat_IsValidAddress(u32 address, u32 size)
|
static bool Cheat_IsValidAddress(u32 address, u32 size)
|
||||||
{
|
{
|
||||||
if (codeStartAddress <= address && address <= codeStartAddress + codeTotalSize - size)
|
if (codeStartAddress > 0 && codeStartAddress <= address && address <= codeStartAddress + codeTotalSize - size)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (heapStartAddress <= address && address <= heapStartAddress + heapTotalSize - size)
|
if (heapStartAddress > 0 && heapStartAddress <= address && address <= heapStartAddress + heapTotalSize - size)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user