Skip to content

Commit

Permalink
make magic mismatch a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mduft committed Apr 7, 2014
1 parent 4019320 commit a4cb5b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parity.binary/CoffOptionalHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <Exception.h>
#include <Context.h>
#include <Log.h>

namespace parity
{
Expand All @@ -37,7 +38,7 @@ namespace parity
//
// Contructors and Destructors
//
OptionalHeader(void* ptr) : hdr_(*reinterpret_cast<OHStruct*>(ptr)) { if(hdr_.Magic != 0x10b) throw utils::Exception("unsupported or invalid optional header magic: %x\n", hdr_.Magic); }
OptionalHeader(void* ptr) : hdr_(*reinterpret_cast<OHStruct*>(ptr)) { if(hdr_.Magic != 0x10b) utils::Log::warning("unknown or invalid optional header magic: %x\n", hdr_.Magic); }
OptionalHeader() : hdr_() { /* should not be neccessary: ::memset(&hdr_, 0, sizeof(OHStruct)); */ }

//
Expand Down

0 comments on commit a4cb5b7

Please sign in to comment.