Commit 63272d68 authored by Max Kellermann's avatar Max Kellermann

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.
parent 75914035
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment