summaryrefslogtreecommitdiff
path: root/devices/gdevplan.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2019-11-01 12:38:41 +0000
committerRobin Watts <Robin.Watts@artifex.com>2019-11-01 12:38:41 +0000
commit1126deff06d81d4fa1975ea0ed3a3b64e9cf0661 (patch)
treeff07346d92bcbc46bdf0ee479259fd3c089321bd /devices/gdevplan.c
parentbcb881e566d90ae43648085ff1edfdcddcd6eb50 (diff)
downloadghostpdl-1126deff06d81d4fa1975ea0ed3a3b64e9cf0661.tar.gz
Update "planm" device to clear eol padding bits.
This should avoid md5 changes in the alldevs cluster test.
Diffstat (limited to 'devices/gdevplan.c')
-rw-r--r--devices/gdevplan.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/devices/gdevplan.c b/devices/gdevplan.c
index b91f61d00..84640a74c 100644
--- a/devices/gdevplan.c
+++ b/devices/gdevplan.c
@@ -248,13 +248,17 @@ static void dump_row_pnmc(int w, byte **data, gp_file *dump_file)
static void dump_row_pbm(int w, byte **data, gp_file *dump_file)
{
byte *r = data[0];
+ int mask = ~(255>>(w&7));
if (dump_file == NULL)
return;
+ if (w == 0)
+ return;
w = (w+7)>>3;
- while (w--) {
+ while (--w) {
gp_fputc(*r++, dump_file);
}
+ gp_fputc(mask & *r, dump_file);
}
static void dump_row_pgm(int w, byte **data, gp_file *dump_file)