Commit 739152ce authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

msi: Remove an extraneous safety check and simplify deformat_string().

parent e169bb0a
......@@ -368,18 +368,16 @@ DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data )
MSI_RecordSetStringW(rec,0,ptr);
MSI_FormatRecordW(package,rec,NULL,&size);
if (size >= 0)
{
size++;
*data = msi_alloc(size*sizeof(WCHAR));
if (size > 1)
MSI_FormatRecordW(package,rec,*data,&size);
else
*data[0] = 0;
msiobj_release( &rec->hdr );
return sizeof(WCHAR)*size;
}
size++;
*data = msi_alloc(size*sizeof(WCHAR));
if (size > 1)
MSI_FormatRecordW(package,rec,*data,&size);
else
*data[0] = 0;
msiobj_release( &rec->hdr );
return sizeof(WCHAR)*size;
}
*data = NULL;
......
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