mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-20 17:59:08 +02:00
Return an invalid size error even for VAG = 0.
This commit is contained in:
1 parent
aeb2b23735
commit
91bdc0617e
1 file changed
+5
-5
+5
-5
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user