diff options
Diffstat (limited to 'devices/gdevplan.c')
-rw-r--r-- | devices/gdevplan.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/devices/gdevplan.c b/devices/gdevplan.c index b91f61d0..313d08f8 100644 --- a/devices/gdevplan.c +++ b/devices/gdevplan.c @@ -248,13 +248,26 @@ 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]; +#ifdef CLUSTER + int end = w>>3; + byte mask = 255>>(w&7); + if (w & 7) + mask = ~mask; + else + end--; +#else + byte mask = 255; +#endif 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) |