mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-23 09:34:55 +00:00
Return an invalid size error even for VAG = 0.
This commit is contained in:
parent
aeb2b23735
commit
91bdc0617e
@ -124,16 +124,16 @@ u32 sceSasSetVoice(u32 core, int voiceNum, u32 vagAddr, int size, int loop) {
|
||||
return ERROR_SAS_INVALID_VOICE;
|
||||
}
|
||||
|
||||
if (!Memory::IsValidAddress(vagAddr)) {
|
||||
ERROR_LOG(HLE, "Ignoring invalid VAG audio address %08x", vagAddr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (size <= 0 || (size & 0xF) != 0) {
|
||||
WARN_LOG(HLE, "%s: invalid size %d", __FUNCTION__, size);
|
||||
return ERROR_SAS_INVALID_SIZE;
|
||||
}
|
||||
|
||||
if (!Memory::IsValidAddress(vagAddr)) {
|
||||
ERROR_LOG(HLE, "Ignoring invalid VAG audio address %08x", vagAddr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Real VAG header is 0x30 bytes behind the vagAddr
|
||||
SasVoice &v = sas->voices[voiceNum];
|
||||
u32 prevVagAddr = v.vagAddr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user