mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-12-01 01:27:20 +01:00
Sanify loops: ignore negative start
This commit is contained in:
parent
ea7b8d2570
commit
12760d2183
@ -376,8 +376,9 @@ VGMSTREAM * init_vgmstream_internal(STREAMFILE *streamFile, int do_dfs) {
|
||||
|
||||
/* Sanify loops! */
|
||||
if (vgmstream->loop_flag) {
|
||||
if ((vgmstream->loop_end_sample <= vgmstream->loop_start_sample) ||
|
||||
(vgmstream->loop_end_sample > vgmstream->num_samples))
|
||||
if ((vgmstream->loop_end_sample <= vgmstream->loop_start_sample)
|
||||
|| (vgmstream->loop_end_sample > vgmstream->num_samples)
|
||||
|| (vgmstream->loop_start_sample < 0) )
|
||||
vgmstream->loop_flag = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user