From d1c2b01b98cf5ecf5f43589608d0d821c4567830 Mon Sep 17 00:00:00 2001 From: fastelbja Date: Sat, 10 Oct 2009 19:02:46 +0000 Subject: [PATCH] some bug fixes git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@709 51a99a44-fe44-0410-b1ba-c3e57ba2b86b --- src/meta/thp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/meta/thp.c b/src/meta/thp.c index f00f3ae9..1ce36e38 100644 --- a/src/meta/thp.c +++ b/src/meta/thp.c @@ -42,7 +42,10 @@ VGMSTREAM * init_vgmstream_thp(STREAMFILE *streamFile) { loop_flag = 0; // allways unloop /* fill in the vital statistics */ - start_offset = read_32bitBE(0x28,streamFile); + if(thpVersion==0x10) + start_offset = read_32bitBE(0x24,streamFile); + else + start_offset = read_32bitBE(0x28,streamFile); // Get info from the first block componentTypeOffset = read_32bitBE(0x20,streamFile); @@ -81,6 +84,7 @@ VGMSTREAM * init_vgmstream_thp(STREAMFILE *streamFile) { } } + start_offset=read_32bitBE(0x28,streamFile); vgmstream->thpNextFrameSize=read_32bitBE(0x18,streamFile); thp_block_update(start_offset,vgmstream);