summaryrefslogtreecommitdiff
path: root/base/gxpcmap.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2022-03-15 19:53:46 +0000
committerRobin Watts <Robin.Watts@artifex.com>2022-03-15 19:57:29 +0000
commit0b178d336c6369dbde17147de7055d379ded679e (patch)
tree2ad8648c85d8a00a2781052c9cd5e328c207b7a2 /base/gxpcmap.c
parent3aac4c1d09c3b0772727609cac0242905e45ceea (diff)
downloadghostpdl-0b178d336c6369dbde17147de7055d379ded679e.tar.gz
Bug 705063: Fix blank_unmasked_bits to work msb, not lsb.
When working with alphabits, we read pixels back from the destination buffer, process it, and then write it out again. The reading of the current pixels is done via get_bits_rectangle. When working with a mask, this calls blank_unmasked_bits to avoid returning undefined values. This routine was incorrectly written to read the mask as it pixels were packed into a byte least significant bit first. Correct it to work most significant bit first.
Diffstat (limited to 'base/gxpcmap.c')
-rw-r--r--base/gxpcmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/gxpcmap.c b/base/gxpcmap.c
index ae79987f0..86af08854 100644
--- a/base/gxpcmap.c
+++ b/base/gxpcmap.c
@@ -676,7 +676,7 @@ blank_unmasked_bits(gx_device * mask,
for (x = 0; x < w; x++)
{
int xx = x+x0;
- if (((mine[xx>>3]>>(x&7)) & 1) == 0) {
+ if (((mine[xx>>3]<<(x&7)) & 128) == 0) {
switch (depth)
{
case 8: