mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-16 07:50:28 +02:00
Add a sanity check
This commit is contained in:
1 parent
6df9e513c1
commit
33fd29faad
1 file changed
+6
@@ -578,6 +578,12 @@ static void ComputeStreamBufferDataInfo(const SceAtracIdInfo &info, u32 *writePt
|
||||
const int loopStartFileOffset = ComputeFileOffset(info, info.loopStart);
|
||||
const int loopEndFileOffset = ComputeLoopEndFileOffset(info, info.loopEnd);
|
||||
|
||||
if (spaceLeftInBuffer < 0) {
|
||||
// Most likely, the file was truncated.
|
||||
WARN_LOG(Log::Atrac, "File corruption detected: spaceLeftInBuffer < 0: %d. Stumbling along.", spaceLeftInBuffer);
|
||||
spaceLeftInBuffer = 0;
|
||||
}
|
||||
|
||||
switch (info.state) {
|
||||
case ATRAC_STATUS_STREAMED_WITHOUT_LOOP:
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user