summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-06-07 15:13:16 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-06-07 15:13:16 -0400
commitba6dd0d3f0dd3b3c2491c38d92c90f71fa6d5387 (patch)
treea0811b25ac49145e833524398d2c53ffec08f50d
parent6cfd2577652e4d4a7954434e6ebee629bdb4b94a (diff)
netlist_sound: Fix sound_assert in debug builds
-rw-r--r--src/devices/machine/netlist.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 7c43c35838d..cc1f92c5755 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -828,7 +828,8 @@ void netlist_mame_stream_output_device::sound_update_fill(write_stream_view &tar
int sampindex;
for (sampindex = 0; sampindex < m_buffer.size(); sampindex++)
target.put(sampindex, m_buffer[sampindex]);
- target.fill(m_cur, sampindex);
+ if (sampindex < target.samples())
+ target.fill(m_cur, sampindex);
}