From 826980d7f414777b40128bb850165a635c90d8b6 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 11 Mar 2014 00:34:45 +0400 Subject: [PATCH] widl: Fix duplicate typeinfo being written to typelib for enums. --- tools/widl/write_msft.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index cc039dc8895..724be27e19d 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -2101,6 +2101,9 @@ static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration) var_t *cur; msft_typeinfo_t *msft_typeinfo; + if (-1 < enumeration->typelib_idx) + return; + enumeration->typelib_idx = typelib->typelib_header.nrtypeinfos; msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ENUM, enumeration->name, enumeration->attrs); msft_typeinfo->typeinfo->size = 0;