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.
This commit is contained in:
parent
7591403566
commit
63272d6888
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user