Minor memory safety fixes

This commit is contained in:
Henrik Rydgård committed 2025-05-14 09:39:09 +02:00
1 parent c9b5f5b33a
commit ff37cbe184
11 files changed
+48 -25

No files matched your search

+1 -1
View File
@@ -496,7 +496,7 @@ void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength, const char
// TODO: This mainly seems to be produced by GPUCommon::PerformMemorySet, called from
// Replace_memset_jak(). Strangely, this managed to crash in Write_U8().
for (size_t i = 0; i < _iLength; i++) {
if (Memory::IsValidAddress(_Address + i)) {
if (Memory::IsValidAddress(_Address + (u32)i)) {
WriteUnchecked_U8(_iValue, (u32)(_Address + i));
}
}