Improve semantics

This commit is contained in:
Henrik Rydgård committed 2026-08-10 10:11:24 +02:00
1 parent 2c4e3e241c
commit 66c8bfbcb2
9 files changed
+66 -55

No files matched your search

+7 -5
View File
@@ -57,12 +57,14 @@ int PSPMsgDialog::Init(unsigned int paramAddr) {
}
messageDialogAddr = paramAddr;
if (!Memory::IsValidAddress(messageDialogAddr))
{
return 0;
if (!Memory::IsValid4AlignedAddress(paramAddr)) {
// What to do?
return SCE_KERNEL_ERROR_BAD_ARGUMENT;
}
int size = Memory::Read_U32(paramAddr);
memset(&messageDialog,0,sizeof(messageDialog));
int size = Memory::ReadUnchecked_U32(paramAddr);
memset(&messageDialog, 0, sizeof(messageDialog));
// Only copy the right size to support different request format
Memory::Memcpy(&messageDialog,paramAddr,size);