aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-18 19:54:39 +0100
committerMax Kellermann <max@duempel.org>2008-11-18 19:54:39 +0100
commit63272d6888c4f63db8227b857361cd5cda22a0c3 (patch)
treed13654a719832de46d3a97808fbb3d293f013f81 /src
parent7591403566971eb19ba7bb16002eaa2689a637c7 (diff)
downloadmpd-63272d6888c4f63db8227b857361cd5cda22a0c3.tar.gz
mpd-63272d6888c4f63db8227b857361cd5cda22a0c3.tar.xz
mpd-63272d6888c4f63db8227b857361cd5cda22a0c3.zip
music_pipe: narrowed assertion on chunk index
The chunk index passed to successor() must be valid, i.e. it must be smaller than num_chunks.
Diffstat (limited to '')
-rw-r--r--src/pipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pipe.c b/src/pipe.c
index 23a23469c..a11cfb4c5 100644
--- a/src/pipe.c
+++ b/src/pipe.c
@@ -67,7 +67,7 @@ void music_pipe_free(void)
/** return the index of the chunk after i */
static inline unsigned successor(unsigned i)
{
- assert(i <= music_pipe.num_chunks);
+ assert(i < music_pipe.num_chunks);
++i;
return i == music_pipe.num_chunks ? 0 : i;