diff options
| author | 2026-05-12 06:02:42 -0700 | |
|---|---|---|
| committer | 2026-05-12 09:02:42 -0400 | |
| commit | cd830839c50cd8a9666906856d3276c105ee0813 (patch) | |
| tree | 92ad70ab9193cb9b3987bfac0224c7df90fc5c87 | |
| parent | 2b2dd63fe1ffa584d81fc0cb43e1c4bf7301b8c8 (diff) | |
floppy: fix oob caused by m_step_samplepos dirty trick (#15332)
| -rw-r--r-- | src/devices/imagedev/floppy.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 00614095261..ed77c9080e3 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -1981,7 +1981,8 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream) sampleend = m_sample[m_step_sample-1].data.size(); // Mix it into the stream value - out += m_sample[m_step_sample-1].data[m_step_samplepos++]; + if (m_step_samplepos < sampleend) + out += m_sample[m_step_sample-1].data[m_step_samplepos++]; if (m_step_samplepos >= sampleend) { // Step sample done |
