Alexandre Julliard : fusion: Fix the 32/ 64 PE image format check on 64-bit platforms.
Alexandre Julliard
julliard at winehq.org
Wed Apr 8 10:05:33 CDT 2009
Module: wine
Branch: master
Commit: e2aefee80ead5f53b8368f3dbac4f8d1a4a4dba3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e2aefee80ead5f53b8368f3dbac4f8d1a4a4dba3
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Apr 8 12:06:35 2009 +0200
fusion: Fix the 32/64 PE image format check on 64-bit platforms.
---
dlls/fusion/assembly.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/fusion/assembly.c b/dlls/fusion/assembly.c
index a7b09c8..faef8ef 100644
--- a/dlls/fusion/assembly.c
+++ b/dlls/fusion/assembly.c
@@ -631,14 +631,18 @@ static HRESULT parse_pe_header(ASSEMBLY *assembly)
if (!assembly->nthdr)
return E_FAIL;
- if (assembly->nthdr->FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64)
+ if (assembly->nthdr->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
{
IMAGE_OPTIONAL_HEADER64 *opthdr =
(IMAGE_OPTIONAL_HEADER64 *)&assembly->nthdr->OptionalHeader;
datadirs = opthdr->DataDirectory;
}
else
- datadirs = assembly->nthdr->OptionalHeader.DataDirectory;
+ {
+ IMAGE_OPTIONAL_HEADER32 *opthdr =
+ (IMAGE_OPTIONAL_HEADER32 *)&assembly->nthdr->OptionalHeader;
+ datadirs = opthdr->DataDirectory;
+ }
if (!datadirs)
return E_FAIL;
More information about the wine-cvs
mailing list