[winpr,clipboard] support alternate bitmap mime types

This commit is contained in:
Armin Novak 2024-01-31 09:28:09 +01:00 committed by akallabeth
parent 894474b161
commit f51fdb2813
2 changed files with 8 additions and 6 deletions

View File

@ -83,9 +83,10 @@ static wClipboardFormat* ClipboardFindFormat(wClipboard* clipboard, UINT32 forma
{
for (index = 0; index < clipboard->numFormats; index++)
{
if (formatId == clipboard->formats[index].formatId)
wClipboardFormat* cformat = &clipboard->formats[index];
if (formatId == cformat->formatId)
{
format = &clipboard->formats[index];
format = cformat;
break;
}
}
@ -94,12 +95,13 @@ static wClipboardFormat* ClipboardFindFormat(wClipboard* clipboard, UINT32 forma
{
for (index = 0; index < clipboard->numFormats; index++)
{
if (!clipboard->formats[index].formatName)
wClipboardFormat* cformat = &clipboard->formats[index];
if (!cformat->formatName)
continue;
if (strcmp(name, clipboard->formats[index].formatName) == 0)
if (strcmp(name, cformat->formatName) == 0)
{
format = &clipboard->formats[index];
format = cformat;
break;
}
}

View File

@ -234,7 +234,7 @@ static void* clipboard_synthesize_cf_dib(wClipboard* clipboard, UINT32 formatId,
}
else if (is_format_bitmap(clipboard, formatId))
{
const BITMAPFILEHEADER* pFileHeader;
const BITMAPFILEHEADER* pFileHeader = NULL;
if (SrcSize < (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER)))
return NULL;