mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
revert base changes. The original test case was wrong
svn path=/trunk/; revision=26421
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user