Skip to content

Commit

Permalink
detect Bamboo Tracker files by magic only
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcima committed Mar 30, 2019
1 parent b77393b commit 4cf6ce0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/FileFormats/format_bamboo_bti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,8 @@ static const char bti_magic[] = "BambooTrackerIst";

bool Bamboo_BTI::detectInst(const QString &filePath, char *magic)
{
//By name extension
if(filePath.endsWith(".bti", Qt::CaseInsensitive))
return true;

//By magic
if(std::memcmp(magic, bti_magic, 16) == 0)
return true;

return false;
return std::memcmp(magic, bti_magic, 16) == 0;
}

static constexpr uint32_t btVersion(uint8_t x, uint8_t y, uint8_t z)
Expand Down

0 comments on commit 4cf6ce0

Please sign in to comment.