From b53cebe62dcfab9270e86d8c67ceff1032485da8 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 25 Jun 2007 21:09:08 +0000 Subject: Fix for a stupid typo in yesterdays sound fill tweak. This fixes bug 1743016. Thanks to erictorbjorn and md5 for pointing me at it. svn-id: r27718 --- sound/audiostream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index 9fd2f046fe..6a04da5f43 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -158,7 +158,7 @@ template int LinearMemoryStream::readBuffer(int16 *buffer, const int numSamples) { int samples = numSamples; while (samples > 0 && _ptr < _end) { - int len = MIN(numSamples, (int)(_end - _ptr) / (is16Bit ? 2 : 1)); + int len = MIN(samples, (int)(_end - _ptr) / (is16Bit ? 2 : 1)); samples -= len; do { *buffer++ = READ_ENDIAN_SAMPLE(is16Bit, isUnsigned, _ptr, isLE); -- cgit v1.2.3