Skip to content
Snippets Groups Projects
Commit dc7c1b87 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard
Browse files

Fixed a few bugs (typos from cut & paste & invalid heap block

freeing).
parent b3c7f845
No related branches found
No related tags found
No related merge requests found
......@@ -732,7 +732,7 @@ static void X11DRV_DIB_SetImageBits_16( int lines, const BYTE *srcbits,
imageBits[(x << 1) + indB] = (BYTE)(((val << 1) & 0x00c0) | (val & 0x001f));
}
ptr = (LPWORD)(srcbits += linebytes) + left;
imageBits -= bmpImage->bytes_per_line;
imageBits += bmpImage->bytes_per_line;
}
}
return;
......@@ -758,7 +758,7 @@ static void X11DRV_DIB_SetImageBits_16( int lines, const BYTE *srcbits,
}
} else {
lines = -lines;
imageBits = (BYTE *)(bmpImage->data + (lines - 1)*bmpImage->bytes_per_line);
imageBits = (BYTE *)bmpImage->data;
for (h = 0; h < lines; h++) {
for (x = left; x < dstwidth; x++, ptr ++) {
val = *ptr;
......@@ -768,7 +768,7 @@ static void X11DRV_DIB_SetImageBits_16( int lines, const BYTE *srcbits,
imageBits[(x << 2) + indD] = (BYTE)(((val << 3) & 0x00f8) | ((val >> 2) & 0x0007));
}
ptr = (LPWORD)(srcbits += linebytes) + left;
imageBits -= bmpImage->bytes_per_line;
imageBits += bmpImage->bytes_per_line;
}
}
return;
......@@ -1406,7 +1406,8 @@ INT X11DRV_SetDIBitsToDevice( DC *dc, INT xDest, INT yDest, DWORD cx,
result = CALL_LARGE_STACK( X11DRV_DIB_SetImageBits, &descr );
LeaveCriticalSection( &X11DRV_CritSection );
HeapFree(GetProcessHeap(), 0, descr.colorMap);
if (descr.infoBpp <= 8)
HeapFree(GetProcessHeap(), 0, descr.colorMap);
return result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment