Skip to content

Commit

Permalink
fileformat/format_detection: fix #431, if raw mode specified, force it.
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMatula committed Mar 4, 2019
1 parent a6a951f commit a95fd46
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/fileformat/utils/format_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ bool isStrangeFeedface(std::istream& stream)

Format detectFileFormat(std::istream &inputStream, bool isRaw)
{
if (isRaw)
{
return Format::RAW_DATA;
}

resetStream(inputStream);

std::size_t magicSize = 0;
Expand Down Expand Up @@ -266,10 +271,6 @@ Format detectFileFormat(std::istream &inputStream, bool isRaw)
{
return Format::COFF;
}
else if(isRaw)
{
return Format::RAW_DATA;
}

return Format::UNKNOWN;
}
Expand Down

0 comments on commit a95fd46

Please sign in to comment.