Rob Shearman : msi: Add a non-persistent string instead of a persistent one if the table or row is non-persistent .

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 24 07:24:06 CDT 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Mon Apr 23 08:27:37 2007 +0100

msi: Add a non-persistent string instead of a persistent one if the table or row is non-persistent.

---

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

diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index b6ede40..ea1314e 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -1250,10 +1250,14 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
 
     for ( i = 0; i < tv->num_cols; i++ )
     {
+        BOOL persistent;
+
         /* only update the fields specified in the mask */
         if ( !(mask&(1<<i)) )
             continue;
 
+        /* if row >= tv->table->row_count then it is a non-persistent row */
+        persistent = tv->table->persistent && (row < tv->table->row_count);
         /* FIXME: should we allow updating keys? */
 
         val = 0;
@@ -1266,7 +1270,8 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
             else if ( tv->columns[i].type & MSITYPE_STRING )
             {
                 LPCWSTR sval = MSI_RecordGetString( rec, i + 1 );
-                val = msi_addstringW( tv->db->strings, 0, sval, -1, 1, StringPersistent );
+                val = msi_addstringW( tv->db->strings, 0, sval, -1, 1,
+                                      persistent ? StringPersistent : StringNonPersistent );
             }
             else if ( 2 == bytes_per_column( &tv->columns[ i ] ) )
             {




More information about the wine-cvs mailing list