aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword1')
-rw-r--r--engines/sword1/music.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index f23b073b58..6a119ac5ec 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -100,7 +100,7 @@ int WaveAudioStream::readBuffer(int16 *buffer, const int numSamples) {
int retVal = 0;
while (retVal < numSamples && _samplesLeft > 0) {
- int samples = MIN((int)_samplesLeft, numSamples);
+ int samples = MIN((int)_samplesLeft, numSamples - retVal);
retVal += samples;
_samplesLeft -= samples;
while (samples > 0) {