mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-15 02:57:38 +01:00
Fix outbuf only being partially cleared when trying to read after EOF
This commit is contained in:
parent
8d7c52f460
commit
fcf8a9485c
@ -83,8 +83,8 @@ void decode_vorbis_custom(VGMSTREAM * vgmstream, sample * outbuf, int32_t sample
|
|||||||
while (samples_done < samples_to_do) {
|
while (samples_done < samples_to_do) {
|
||||||
|
|
||||||
/* extra EOF check for edge cases */
|
/* extra EOF check for edge cases */
|
||||||
if (stream->offset > stream_size) {
|
if (stream->offset >= stream_size) {
|
||||||
memset(outbuf + samples_done * channels, 0, (samples_to_do - samples_done) * sizeof(sample));
|
memset(outbuf + samples_done * channels, 0, (samples_to_do - samples_done) * sizeof(sample) * channels);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user