summaryrefslogtreecommitdiff
path: root/src/inc/pedecoder.inl
diff options
context:
space:
mode:
authorJohn Chen <jochen@microsoft.com>2015-11-03 10:23:19 -0800
committerJohn Chen <jochen@microsoft.com>2015-11-03 10:23:19 -0800
commitd3c3bbfff259642ec9508a4ed713c1989de2297d (patch)
tree1680ce9d7c8db4f500d49164b29648a6afc5bb45 /src/inc/pedecoder.inl
parent631be63c6c5463f028b88140fbbf1aad46850675 (diff)
downloadcoreclr-d3c3bbfff259642ec9508a4ed713c1989de2297d.tar.gz
coreclr-d3c3bbfff259642ec9508a4ed713c1989de2297d.tar.bz2
coreclr-d3c3bbfff259642ec9508a4ed713c1989de2297d.zip
Fix assert / access violation in PEDeocder due to change from GitHub
Recent change on GitHub to modify platform ID of Unix platforms caused issues with desktop CLR. [tfs-changeset: 1544631]
Diffstat (limited to 'src/inc/pedecoder.inl')
-rw-r--r--src/inc/pedecoder.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inc/pedecoder.inl b/src/inc/pedecoder.inl
index 12b00d21ec..f99d76d1ba 100644
--- a/src/inc/pedecoder.inl
+++ b/src/inc/pedecoder.inl
@@ -962,7 +962,7 @@ inline BOOL PEDecoder::IsNativeMachineFormat() const
if (!HasContents() || !HasNTHeaders() )
return FALSE;
_ASSERTE(m_pNTHeaders);
- WORD expectedFormat = (HasNativeHeader() || HasReadyToRunHeader()) ?
+ WORD expectedFormat = HasCorHeader() && (HasNativeHeader() || HasReadyToRunHeader()) ?
IMAGE_FILE_MACHINE_NATIVE_NI :
IMAGE_FILE_MACHINE_NATIVE;
//do not call GetNTHeaders as we do not want to bother with PE32->PE32+ conversion