diff options
Diffstat (limited to 'view/pe/teview.cpp')
| -rw-r--r-- | view/pe/teview.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/view/pe/teview.cpp b/view/pe/teview.cpp index f8666717..e5fb2a1b 100644 --- a/view/pe/teview.cpp +++ b/view/pe/teview.cpp @@ -257,16 +257,12 @@ bool TEView::Init() break; default: LogError("TE platform '0x%x' is not supported", header.machine); + if (!m_parseOnly) + m_logger->LogWarn("Unable to determine architecture. Please open the file with options and select a valid architecture."); return false; } } - if (!platform) - { - LogError("Platform not supported by this version of Binary Ninja"); - return false; - } - m_arch = platform->GetArchitecture(); if (!m_arch) { @@ -371,13 +367,13 @@ bool TEViewType::IsTypeValidForData(BinaryView* bv) return false; } -Ref<Settings> TEViewType::GetLoadSettingsForData(BinaryView *bv) +Ref<Settings> TEViewType::GetLoadSettingsForData(BinaryView* data) { - Ref<BinaryView> viewRef = Parse(bv); + Ref<BinaryView> viewRef = Parse(data); if (!viewRef || !viewRef->Init()) { - m_logger->LogError("View type '%s' could not be created", GetName().c_str()); - return nullptr; + m_logger->LogWarn("Failed to initialize view of type '%s'. Generating default load settings.", GetName().c_str()); + viewRef = data; } // specify default load settings that can be overridden |
