Browse Source

Fix BASSMODS IT input, and add MO3 signature check.

master
Christopher Snowhill 2 years ago
parent
commit
b5330c2839
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      Plugins/BASSMODS/BASSMODS/BASSDecoder.mm

+ 3
- 3
Plugins/BASSMODS/BASSMODS/BASSDecoder.mm View File

@@ -76,6 +76,8 @@ static void SyncProc( HSYNC handle, DWORD channel, DWORD data, void *user )

- (BOOL)open:(id<CogSource>)s
{
[self setSource:s];
[source seek:0 whence:SEEK_END];
long size = [source tell];
[source seek:0 whence:SEEK_SET];
@@ -89,14 +91,12 @@ static void SyncProc( HSYNC handle, DWORD channel, DWORD data, void *user )
data = try_data;
}
if (memcmp(data, "IMPM", 4) != 0) {
if (size < 4 || (memcmp(data, "mo3", 3) != 0 && memcmp(data, "IMPM", 4) != 0)) {
ALog(@"BASS was passed a non-IT module");
free(data);
return NO;
}
[self setSource:s];
NSURL * url = [s url];
int track_num;
if ([[url fragment] length] == 0)


Loading…
Cancel
Save