Huw Davies : widl: Fix typelib lcid fields to match those produced by midl.

Alexandre Julliard julliard at winehq.org
Tue Jun 9 10:45:28 CDT 2009


Module: wine
Branch: master
Commit: 7857219ac1e9c99d6fe28cb7ce5b2b9b7451d547
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7857219ac1e9c99d6fe28cb7ce5b2b9b7451d547

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Jun  9 14:58:28 2009 +0100

widl: Fix typelib lcid fields to match those produced by midl.

---

 tools/widl/write_msft.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c
index a22b8b3..7a709bc 100644
--- a/tools/widl/write_msft.c
+++ b/tools/widl/write_msft.c
@@ -141,7 +141,7 @@ static void ctl2_init_header(
     typelib->typelib_header.magic1 = 0x5446534d;
     typelib->typelib_header.magic2 = 0x00010002;
     typelib->typelib_header.posguid = -1;
-    typelib->typelib_header.lcid = 0x0409; /* or do we use the current one? */
+    typelib->typelib_header.lcid = 0x0409;
     typelib->typelib_header.lcid2 = 0x0;
     typelib->typelib_header.varflags = 0x40;
     typelib->typelib_header.version = 0;
@@ -2362,7 +2362,11 @@ static void set_help_string_context(msft_typelib_t *typelib)
 static void set_lcid(msft_typelib_t *typelib)
 {
     const expr_t *lcid_expr = get_attrp( typelib->typelib->attrs, ATTR_LIBLCID );
-    typelib->typelib_header.lcid2 = lcid_expr ? lcid_expr->cval : 0x0;
+    if(lcid_expr)
+    {
+        typelib->typelib_header.lcid  = lcid_expr->cval;
+        typelib->typelib_header.lcid2 = lcid_expr->cval;
+    }
 }
 
 static void set_lib_flags(msft_typelib_t *typelib)




More information about the wine-cvs mailing list