Ubi SB: Fixed SB header parsing

This commit is contained in:
NicknineTheEagle 2019-11-21 10:09:15 +03:00
parent df046f9821
commit ecdf33be25

View File

@ -221,17 +221,17 @@ VGMSTREAM * init_vgmstream_ubi_sb(STREAMFILE *streamFile) {
sb.section1_offset = 0x20;
} else if (sb.version <= 0x000A0000) {
sb.section1_num = read_32bit(0x04, streamFile);
sb.section2_num = read_32bit(0x0c, streamFile);
sb.section3_num = read_32bit(0x14, streamFile);
sb.sectionX_size = read_32bit(0x1c, streamFile);
sb.section2_num = read_32bit(0x08, streamFile);
sb.section3_num = read_32bit(0x0c, streamFile);
sb.sectionX_size = read_32bit(0x10, streamFile);
sb.flag1 = read_32bit(0x14, streamFile);
sb.section1_offset = 0x18;
} else {
sb.section1_num = read_32bit(0x04, streamFile);
sb.section2_num = read_32bit(0x0c, streamFile);
sb.section3_num = read_32bit(0x14, streamFile);
sb.sectionX_size = read_32bit(0x1c, streamFile);
sb.section2_num = read_32bit(0x08, streamFile);
sb.section3_num = read_32bit(0x0c, streamFile);
sb.sectionX_size = read_32bit(0x10, streamFile);
sb.flag1 = read_32bit(0x14, streamFile);
sb.flag2 = read_32bit(0x18, streamFile);