diff options
author | 2021-05-31 17:46:46 -0700 | |
---|---|---|
committer | 2021-05-31 17:46:46 -0700 | |
commit | b630ea12cd42b31cd927f68e1585953263a7dada (patch) | |
tree | 1d8f172710402f0ebce16c043695ce4ace0f089f /src/devices/sound | |
parent | 7b5e54a3dfdaa4865f15a3a2e5d8a3b303fe0a75 (diff) |
bbd: Fix out of bounds accesses.
Diffstat (limited to 'src/devices/sound')
-rw-r--r-- | src/devices/sound/bbd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/sound/bbd.h b/src/devices/sound/bbd.h index aa307d283c2..b39e13e08cb 100644 --- a/src/devices/sound/bbd.h +++ b/src/devices/sound/bbd.h @@ -36,7 +36,7 @@ protected: protected: // override to convert clock to sample rate - stream_buffer::sample_t outputval(s32 index) const { return m_buffer[m_curpos + Entries + index]; } + stream_buffer::sample_t outputval(s32 index) const { return m_buffer[(m_curpos + Entries + index) % std::size(m_buffer)]; } virtual u32 sample_rate() const { return clock(); } sound_stream * m_stream; |