aboutsummaryrefslogtreecommitdiff
path: root/src/pipe.c
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/pipe.c
parent7591403566971eb19ba7bb16002eaa2689a637c7 (diff)
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 'src/pipe.c')
-rw-r--r--src/pipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pipe.c b/src/pipe.c
index 23a23469..a11cfb4c 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;