From c3254cde9e557df7238f3393da322c1f2cdf91e8 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 22 Feb 2007 16:36:03 +0000 Subject: [PATCH] If an AudioStream returned a negative number in his readBuffer() method, then CopyRateConverter::flow could have got stuck in a (quasi) endless loop svn-id: r25790 --- sound/rate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/rate.cpp b/sound/rate.cpp index 87ba79502d4..a48e5ac1f64 100644 --- a/sound/rate.cpp +++ b/sound/rate.cpp @@ -229,7 +229,7 @@ public: // Mix the data into the output buffer ptr = _buffer; - while (len--) { + while (len-- > 0) { st_sample_t tmp0, tmp1; tmp0 = tmp1 = *ptr++; if (stereo) {