mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 13:06:24 +02:00
Memory::Memset: IsValidRange is a better solution.
This commit is contained in:
1 parent
3e011238c5
commit
100cf60bc7
1 file changed
+2
-2
+2
-2
@@ -439,8 +439,8 @@ void Write_Opcode_JIT(const u32 _Address, const Opcode& _Value)
|
||||
}
|
||||
|
||||
void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength) {
|
||||
u8 *ptr = GetPointer(_Address);
|
||||
if (ptr && IsValidAddress(_Address + _iLength - 1)) {
|
||||
if (IsValidRange(_Address, _iLength)) {
|
||||
uint8_t *ptr = GetPointerUnchecked(_Address);
|
||||
memset(ptr, _iValue, _iLength);
|
||||
} else {
|
||||
for (size_t i = 0; i < _iLength; i++)
|
||||
|
||||
Reference in new issue
Block a user