Commit 2a190216 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: VolumeLabel and DiskPrompt are optional fields in the Media table.

parent 4def5934
...@@ -820,10 +820,13 @@ static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi) ...@@ -820,10 +820,13 @@ static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi)
volume, &volumesz, prompt, &promptsz) == ERROR_SUCCESS) volume, &volumesz, prompt, &promptsz) == ERROR_SUCCESS)
{ {
mi->disk_id = id; mi->disk_id = id;
mi->volume_label = msi_realloc(mi->volume_label, ++volumesz * sizeof(WCHAR)); msi_free( mi->volume_label );
lstrcpyW(mi->volume_label, volume); if (!(mi->volume_label = msi_alloc( ++volumesz * sizeof(WCHAR) ))) return ERROR_OUTOFMEMORY;
mi->disk_prompt = msi_realloc(mi->disk_prompt, ++promptsz * sizeof(WCHAR)); strcpyW( mi->volume_label, volume );
lstrcpyW(mi->disk_prompt, prompt);
msi_free( mi->disk_prompt );
if (!(mi->disk_prompt = msi_alloc( ++promptsz * sizeof(WCHAR) ))) return ERROR_OUTOFMEMORY;
strcpyW( mi->disk_prompt, prompt );
if (source_matches_volume(mi, source)) if (source_matches_volume(mi, source))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment