mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-08 15:29:09 +00:00
Ensured no attempt to call strcmp
on null
if a file name without an extension got into here.
This commit is contained in:
parent
97cdfea9e9
commit
7ab6023a0c
@ -84,6 +84,8 @@ std::list<Target> StaticAnalyser::GetTargets(const char *file_name)
|
||||
TryInsert(list, class, platforms) \
|
||||
}
|
||||
|
||||
if(lowercase_extension)
|
||||
{
|
||||
Format("a26", cartridges, Cartridge::BinaryDump, TargetPlatform::Atari2600) // A26
|
||||
Format("adf", disks, Disk::AcornADF, TargetPlatform::Acorn) // ADF
|
||||
Format("bin", cartridges, Cartridge::BinaryDump, TargetPlatform::Atari2600) // BIN
|
||||
@ -115,6 +117,7 @@ std::list<Target> StaticAnalyser::GetTargets(const char *file_name)
|
||||
|
||||
#undef Format
|
||||
#undef Insert
|
||||
#undef TryInsert
|
||||
|
||||
// Hand off to platform-specific determination of whether these things are actually compatible and,
|
||||
// if so, how to load them. (TODO)
|
||||
@ -124,5 +127,6 @@ std::list<Target> StaticAnalyser::GetTargets(const char *file_name)
|
||||
if(potential_platforms & (TargetPlatformType)TargetPlatform::Oric) Oric::AddTargets(disks, tapes, cartridges, targets);
|
||||
|
||||
free(lowercase_extension);
|
||||
}
|
||||
return targets;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user