mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
Merge pull request #7065 from sum2012/memset
Prevent unknown getpointer in sceKernelMemset
This commit is contained in:
commit
f25e0f955a
@ -610,11 +610,13 @@ u32 sceKernelMemset(u32 addr, u32 fillc, u32 n)
|
||||
u8 c = fillc & 0xff;
|
||||
DEBUG_LOG(SCEINTC, "sceKernelMemset(ptr = %08x, c = %02x, n = %08x)", addr, c, n);
|
||||
bool skip = false;
|
||||
if (Memory::IsVRAMAddress(addr)) {
|
||||
skip = gpu->PerformMemorySet(addr, fillc, n);
|
||||
}
|
||||
if (!skip) {
|
||||
Memory::Memset(addr, c, n);
|
||||
if (n != 0) {
|
||||
if (Memory::IsVRAMAddress(addr)) {
|
||||
skip = gpu->PerformMemorySet(addr, fillc, n);
|
||||
}
|
||||
if (!skip) {
|
||||
Memory::Memset(addr, c, n);
|
||||
}
|
||||
}
|
||||
return addr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user