mirror of
https://github.com/reactos/reactos.git
synced 2024-08-29 22:58:34 +00:00
revert base changes. The original test case was wrong
svn path=/trunk/; revision=26421
This commit is contained in:
parent
8d7099f9ac
commit
38945890be
|
@ -1564,18 +1564,24 @@ BITMAP_GetObject(BITMAPOBJ * bmp, INT Count, LPVOID buffer)
|
|||
if( buffer == NULL ) return sizeof(BITMAP);
|
||||
if (Count < sizeof(BITMAP)) return 0;
|
||||
|
||||
Count = sizeof(BITMAP);
|
||||
|
||||
if(bmp->dib)
|
||||
{
|
||||
|
||||
if(Count < (INT) sizeof(DIBSECTION))
|
||||
{
|
||||
if (Count > (INT) sizeof(BITMAP)) Count = sizeof(BITMAP);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Count > (INT) sizeof(DIBSECTION)) Count = sizeof(DIBSECTION);
|
||||
}
|
||||
memcpy(buffer, bmp->dib, Count);
|
||||
/* Windows returns bytes copied, not DIBSECTION size */
|
||||
return Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
BITMAP Bitmap;
|
||||
|
||||
if (Count > (INT) sizeof(BITMAP)) Count = sizeof(BITMAP);
|
||||
Bitmap.bmType = 0;
|
||||
Bitmap.bmWidth = bmp->SurfObj.sizlBitmap.cx;
|
||||
Bitmap.bmHeight = bmp->SurfObj.sizlBitmap.cy;
|
||||
|
|
Loading…
Reference in a new issue