revert base changes. The original test case was wrong

svn path=/trunk/; revision=26421
This commit is contained in:
Ged Murphy 2007-04-19 09:33:53 +00:00
parent 8d7099f9ac
commit 38945890be

View file

@ -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;