mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-20 04:21:11 +01:00
who likes declarations mid-block? VC DON'T!
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@727 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
b4ce515213
commit
7093c2b17f
@ -9,14 +9,14 @@ VGMSTREAM * init_vgmstream_his(STREAMFILE *streamFile) {
|
|||||||
int channel_count;
|
int channel_count;
|
||||||
int loop_flag = 0;
|
int loop_flag = 0;
|
||||||
off_t start_offset;
|
off_t start_offset;
|
||||||
|
const uint8_t header_magic_expected[0x16] = "Her Interactive Sound\x1a";
|
||||||
|
uint8_t header_magic[0x16];
|
||||||
|
|
||||||
/* check extension, case insensitive */
|
/* check extension, case insensitive */
|
||||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||||
if (strcasecmp("his",filename_extension(filename))) goto fail;
|
if (strcasecmp("his",filename_extension(filename))) goto fail;
|
||||||
|
|
||||||
/* check header magic */
|
/* check header magic */
|
||||||
const uint8_t header_magic_expected[0x16] = "Her Interactive Sound\x1a";
|
|
||||||
uint8_t header_magic[0x16];
|
|
||||||
if (0x16 != streamFile->read(streamFile, header_magic, 0, 0x16)) goto fail;
|
if (0x16 != streamFile->read(streamFile, header_magic, 0, 0x16)) goto fail;
|
||||||
|
|
||||||
if (memcmp(header_magic_expected, header_magic, 0x16)) goto fail;
|
if (memcmp(header_magic_expected, header_magic, 0x16)) goto fail;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user