Merge pull request #600 from slashiee/diva

Fix random init with .diva looping
This commit is contained in:
bnnm 2020-04-16 00:18:02 +02:00 committed by GitHub
commit 01a03cc40b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ VGMSTREAM * init_vgmstream_diva(STREAMFILE *streamFile) {
off_t start_offset;
int channel_count;
int loop_end;
int loop_flag = (loop_end != 0);
int loop_flag;
/* checks */
if (!check_extensions(streamFile, "diva"))
@ -20,6 +20,8 @@ VGMSTREAM * init_vgmstream_diva(STREAMFILE *streamFile) {
channel_count = read_8bit(0x1C, streamFile);
loop_end = read_32bitLE(0x18, streamFile);
loop_flag = (loop_end != 0);
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count, loop_flag);
if (!vgmstream) goto fail;