IOPBios: Defer to iopMemSafeReadBytes when HLEing writes

This commit is contained in:
Ty Lamontagne 2024-12-12 17:54:00 -05:00
parent 7254a126cb
commit 0e2e650e90
No known key found for this signature in database
GPG Key ID: 1B9139843421A974
1 changed files with 6 additions and 2 deletions

View File

@ -907,8 +907,12 @@ namespace R3000A
{ {
auto buf = std::make_unique<char[]>(count); auto buf = std::make_unique<char[]>(count);
[[unlikely]]
if (!iopMemSafeReadBytes(data, buf.get(), count))
{
for (u32 i = 0; i < count; i++) for (u32 i = 0; i < count; i++)
buf[i] = iopMemRead8(data + i); buf[i] = iopMemRead8(data + i);
}
v0 = file->write(buf.get(), count); v0 = file->write(buf.get(), count);