winex11: Correctly pad 1 bpp DDB's lines with 0 values.

This commit is contained in:
Eric Pouech 2009-02-28 14:07:52 +01:00 committed by Alexandre Julliard
parent 66bd3d428f
commit 21c3e79e52
2 changed files with 4 additions and 2 deletions

View File

@ -1580,7 +1580,6 @@ static void test_GetDIBits(void)
}
/* returned bits are DWORD aligned and upside down */
todo_wine
ok(!memcmp(buf, dib_bits_1, sizeof(dib_bits_1)), "DIB bits don't match\n");
/* Test the palette indices */

View File

@ -618,8 +618,11 @@ static void X11DRV_DIB_GetImageBits_1( int lines, BYTE *dstbits,
}
}
if ((width&7)!=0) {
*dstbyte=dstval;
*dstbyte++=dstval;
}
/* pad with 0 to DWORD alignment */
for (x = (x+7)&~7; x < ((width + 31) & ~31); x+=8)
*dstbyte++ = 0;
dstbits += linebytes;
}
} else {