mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-19 17:29:06 +02:00
Improve semantics
This commit is contained in:
1 parent
2c4e3e241c
commit
66c8bfbcb2
9 files changed
+66
-55
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user