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,19 +368,17 @@ 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;
}
msiobj_release( &rec->hdr );
}
*data = NULL;
return 0;
......
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