Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47031 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/widltypes.h | 1 + tools/widl/write_msft.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index afca4c0b75..1177c1a00a 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -497,6 +497,7 @@ struct _importinfo_t { };
struct _importlib_t { + int offset; char *name;
int version; diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index cb4f0f38dd..4dcbc03702 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -702,15 +702,15 @@ static void alloc_importinfo(msft_typelib_t *typelib, importinfo_t *importinfo)
guid_idx = ctl2_alloc_guid(typelib, &guid);
- alloc_importfile(typelib, guid_idx, importlib->version&0xffff, - importlib->version>>16, importlib->name); + importlib->offset = alloc_importfile(typelib, guid_idx, importlib->version & 0xffff, + importlib->version >> 16, importlib->name); }
if(importinfo->offset == -1 || !(importinfo->flags & MSFT_IMPINFO_OFFSET_IS_GUID)) { MSFT_ImpInfo impinfo;
impinfo.flags = importinfo->flags; - impinfo.oImpFile = 0; + impinfo.oImpFile = importlib->offset;
if(importinfo->flags & MSFT_IMPINFO_OFFSET_IS_GUID) { MSFT_GuidEntry guid;