summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Hurlbut <ghurlbut@mythtv.org>2010-11-18 05:03:05 (GMT)
committer Gavin Hurlbut <ghurlbut@mythtv.org>2010-11-18 05:03:05 (GMT)
commit6427d5ae20660b06f98eb27649ca86b6958ca672 (patch)
treeb2605b8f9b243b86360134320598ff9ea76067ac
parent47ebb94e5656b5cb15e787eb48934eda28c055ab (diff)
Backport [27271] from trunk
Fixes a valgrind-detected issue (reading outside of allocated memory) git-svn-id: http://svn.mythtv.org/svn/branches/release-0-24-fixes@27272 7dbf422c-18fa-0310-86e9-fd20926502f2
-rw-r--r--mythtv/libs/libmyth/audiooutputsettings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mythtv/libs/libmyth/audiooutputsettings.cpp b/mythtv/libs/libmyth/audiooutputsettings.cpp
index a7133be..5bafc82 100644
--- a/mythtv/libs/libmyth/audiooutputsettings.cpp
+++ b/mythtv/libs/libmyth/audiooutputsettings.cpp
@@ -239,7 +239,7 @@ void AudioOutputSettings::SetBestSupportedChannels(int channels)
vector<int>::reverse_iterator it;
for (it = m_channels.rbegin();
- *it >= channels && it < m_channels.rend();
+ it != m_channels.rend() && *it >= channels;
it++)
m_channels.pop_back();
m_channels.push_back(channels);