diff options
Diffstat (limited to 'src/main/print-dpl.c')
-rw-r--r-- | src/main/print-dpl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/print-dpl.c b/src/main/print-dpl.c index 0802838..fde76ea 100644 --- a/src/main/print-dpl.c +++ b/src/main/print-dpl.c @@ -799,9 +799,11 @@ pcx_header (stp_vars_t * v, stp_image_t * image) unsigned short top; /* y = 0 is at bottom */ unsigned short bytes; short xdpi; - int *xdpi_p = (int *) (&xdpi); + int i_xdpi; + int *xdpi_p = (&i_xdpi); short ydpi; - int *ydpi_p = (int *) (&ydpi); + int i_ydpi; + int *ydpi_p = (&i_ydpi); int n; const short zero = 0; @@ -813,6 +815,9 @@ pcx_header (stp_vars_t * v, stp_image_t * image) /* Get resolutions */ dpl_describe_resolution (v, xdpi_p, ydpi_p); + xdpi = (short) i_xdpi; + ydpi = (short) i_ydpi; + bytes = (xdpi * 4 + 7 ) / 8; /* must be an even number */ if (bytes != (bytes & 0xfffe)) bytes++; |