a buffer offset equal to the buffer size is illegal too, fix assertion in
sndbuf_getbufofs()
This commit is contained in:
parent
c7b097b846
commit
ba4ccad7af
@ -307,7 +307,7 @@ sndbuf_getbuf(struct snd_dbuf *b)
|
||||
void *
|
||||
sndbuf_getbufofs(struct snd_dbuf *b, unsigned int ofs)
|
||||
{
|
||||
KASSERT(ofs <= b->bufsize, ("%s: ofs invalid %d", __func__, ofs));
|
||||
KASSERT(ofs < b->bufsize, ("%s: ofs invalid %d", __func__, ofs));
|
||||
|
||||
return b->buf + ofs;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user