mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
Sony BNK: Verify the full beginning frame
This commit is contained in:
parent
142f4887e0
commit
508d69a41b
@ -449,8 +449,11 @@ VGMSTREAM* init_vgmstream_bnk_sony(STREAMFILE* sf) {
|
||||
stream_size += 0x10;
|
||||
for (offset = data_offset + stream_offset + 0x10; offset < max_offset; offset += 0x10) {
|
||||
|
||||
/* beginning frame (if file loops won't have end frame) */
|
||||
if (read_u32be(offset + 0x00, sf) == 0x00000000 && read_u32be(offset + 0x04, sf) == 0x00000000)
|
||||
/* beginning frame (if file loops won't have end frame)
|
||||
* checking the entire 16 byte block, as it is possible
|
||||
* for just the first 8 bytes to be empty [Bully (PS2)] */
|
||||
if (read_u32be(offset + 0x00, sf) == 0x00000000 && read_u32be(offset + 0x04, sf) == 0x00000000 &&
|
||||
read_u32be(offset + 0x08, sf) == 0x00000000 && read_u32be(offset + 0x0C, sf) == 0x00000000)
|
||||
break;
|
||||
|
||||
stream_size += 0x10;
|
||||
|
Loading…
Reference in New Issue
Block a user