From 2ccc525293eb5f33600da09f6dfebdcd508b97f8 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 21 Dec 2022 16:26:06 -0500 Subject: [PATCH] K007232: ??? issue #797 --- src/engine/platform/k007232.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/platform/k007232.cpp b/src/engine/platform/k007232.cpp index aa19773d..ce15f115 100644 --- a/src/engine/platform/k007232.cpp +++ b/src/engine/platform/k007232.cpp @@ -529,10 +529,10 @@ void DivPlatformK007232::renderSamples(int sysID) { } const int length=s->getLoopEndPosition(DIV_SAMPLE_DEPTH_8BIT); - int actualLength=MIN((int)(getSampleMemCapacity()-memPos)-1,length); + int actualLength=MIN((int)(getSampleMemCapacity()-memPos)-2,length); if (actualLength>0) { - if (actualLength>131072-1) { - actualLength=131072-1; + if (actualLength>131072-2) { + actualLength=131072-2; } if ((memPos&0xfe0000)!=((memPos+actualLength+1)&0xfe0000)) { memPos=(memPos+0x1ffff)&0xfe0000;