mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Add sanity check in Memory::Memset
This commit is contained in:
parent
b6f69b71ab
commit
20e93515be
@ -438,14 +438,11 @@ void Write_Opcode_JIT(const u32 _Address, const Opcode& _Value)
|
||||
Memory::WriteUnchecked_U32(_Value.encoding, _Address);
|
||||
}
|
||||
|
||||
void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength)
|
||||
{
|
||||
void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength) {
|
||||
u8 *ptr = GetPointer(_Address);
|
||||
if (ptr != NULL) {
|
||||
if (ptr && IsValidAddress(_Address + _iLength - 1)) {
|
||||
memset(ptr, _iValue, _iLength);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
for (size_t i = 0; i < _iLength; i++)
|
||||
Write_U8(_iValue, (u32)(_Address + i));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user