[MSI]: Sync to Wine 1.5.19.
[reactos.git] / reactos / dll / win32 / msi / dialog.c
index 66d8786..c0ff204 100644 (file)
@@ -309,7 +309,7 @@ static UINT msi_dialog_add_font( MSIRECORD *rec, LPVOID param )
 
     /* create a font and add it to the list */
     name = MSI_RecordGetString( rec, 1 );
-    font = msi_alloc( sizeof *font + strlenW( name )*sizeof (WCHAR) );
+    font = msi_alloc( FIELD_OFFSET( msi_font, name[strlenW( name ) + 1] ));
     strcpyW( font->name, name );
     list_add_head( &dialog->fonts, &font->entry );
 
@@ -414,7 +414,7 @@ static msi_control *msi_dialog_create_window( msi_dialog *dialog,
 
     style |= WS_CHILD;
 
-    control = msi_alloc( sizeof *control + strlenW(name)*sizeof(WCHAR) );
+    control = msi_alloc( FIELD_OFFSET( msi_control, name[strlenW( name ) + 1] ));
     if (!control)
         return NULL;
 
@@ -583,7 +583,7 @@ static void msi_dialog_update_controls( msi_dialog *dialog, LPCWSTR property )
 
 static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCWSTR value )
 {
-    UINT r = msi_set_property( package->db, property, value );
+    UINT r = msi_set_property( package->db, property, value, -1 );
     if (r == ERROR_SUCCESS && !strcmpW( property, szSourceDir ))
         msi_reset_folders( package, TRUE );
 }
@@ -3939,7 +3939,7 @@ static UINT error_dialog_handler(MSIPACKAGE *package, LPCWSTR event,
     if ( !strcmpW( argument, error_abort ) || !strcmpW( argument, error_cancel ) ||
          !strcmpW( argument, error_no ) )
     {
-         msi_set_property( package->db, result_prop, error_abort );
+         msi_set_property( package->db, result_prop, error_abort, -1 );
     }
 
     ControlEvent_CleanupSubscriptions(package);