From 0aec6aeddd75f9ff59053e13ade81ce7b778d8d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 19 Mar 2025 18:17:47 +0100 Subject: [PATCH] Fix silly logic error in Atrac2 --- Core/HLE/AtracCtx2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/HLE/AtracCtx2.cpp b/Core/HLE/AtracCtx2.cpp index f08e8a9ecb..1acb422676 100644 --- a/Core/HLE/AtracCtx2.cpp +++ b/Core/HLE/AtracCtx2.cpp @@ -694,10 +694,11 @@ u32 Atrac2::DecodeInternal(u32 outbufAddr, int *SamplesNum, int *finish) { u32 inAddr = bufferPtr + streamOff; int16_t *outPtr; + _dbg_assert_(samplesToDecode <= info.SamplesPerFrame()); if (samplesToDecode != info.SamplesPerFrame()) { outPtr = decodeTemp_; } else { - outPtr = (int16_t *)Memory::GetPointer(outbufAddr); + outPtr = outbufAddr ? (int16_t *)Memory::GetPointer(outbufAddr) : 0; // outbufAddr can be 0 during skip! } context_->codec.inBuf = inAddr;