Mike McCormack : msi: Work around what appears to be a bug in native MSI' s generation of transform data.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Oct 6 06:28:14 CDT 2006


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

Author: Mike McCormack <mike at codeweavers.com>
Date:   Fri Oct  6 17:36:37 2006 +0900

msi: Work around what appears to be a bug in native MSI's generation of transform data.

---

 dlls/msi/table.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index a01a538..d5e6332 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -1830,6 +1830,7 @@ static UINT msi_table_load_transform( MS
     MSITABLEVIEW *tv = NULL;
     UINT r, n, sz, i, mask;
     MSIRECORD *rec = NULL;
+    UINT colcol = 0;
 
     TRACE("%p %p %p %s\n", db, stg, st, debugstr_w(name) );
 
@@ -1911,6 +1912,20 @@ static UINT msi_table_load_transform( MS
             if( rawdata[n] & 1)
             {
                 TRACE("insert [%d]: ", row);
+
+                /*
+                 * Native msi seems writes nul into the
+                 * Number (2nd) column of the _Columns table.
+                 * Not sure that it's deliberate...
+                 */
+                if (!lstrcmpW(name, szColumns))
+                {
+                    if ( MSI_RecordIsNull( rec, 2 ) )
+                        MSI_RecordSetInteger( rec, 2, ++colcol );
+                    else
+                        ERR("_Columns has non-null data...\n");
+                }
+
                 TABLE_insert_row( &tv->view, rec );
             }
             else if( mask & 0xff )




More information about the wine-cvs mailing list