summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input/input_sdl.cpp
diff options
context:
space:
mode:
author Roman Donchenko <rdonchen@outlook.com>2024-06-08 17:41:52 +0300
committer GitHub <noreply@github.com>2024-06-08 16:41:52 +0200
commit79d3330a60e30ace228052fd8cb8f23857acb863 (patch)
tree6973251e856e7b8a6f2d2aeeaacc99f080e9adb3 /src/osd/modules/input/input_sdl.cpp
parent8f2ca1607b0592f1e7b4beb9f7c4a397ec6d2599 (diff)
imagedev/floppy.cpp: fix out-of-bounds access to the seek sample (#12452)
Currently, when `floppy_sound_device::step` selects a new seek sample, the value of `m_seek_samplepos` remains the same as it was the last time a seek sample was played. This might be an invalid position for the new sample, since the seek samples have different lengths. When this is the case, the next call to `floppy_sound_device::sound_stream_update` makes an out-of-bounds memory access as it reads the sample data. Fix this by resetting `m_seek_samplepos` to 0 when a new seek sample is selected. This also makes the seek sounds more consistent, since previously they would start from a semi-random position each time.
Diffstat (limited to 'src/osd/modules/input/input_sdl.cpp')
0 files changed, 0 insertions, 0 deletions