about summary refs log tree commit diff
path: root/generator/ppmcie.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2011-08-27 23:04:07 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2011-08-27 23:04:07 +0000
commita2e469051d6ba69f500c33aa92bfb71a59f7c784 (patch)
treed7fbc099c833d0355aabc40bf22de623a18b8d25 /generator/ppmcie.c
parent1a100f7692ea04986b5151987edd1d6f06803fdb (diff)
downloadnetpbm-mirror-a2e469051d6ba69f500c33aa92bfb71a59f7c784.tar.gz
netpbm-mirror-a2e469051d6ba69f500c33aa92bfb71a59f7c784.tar.xz
netpbm-mirror-a2e469051d6ba69f500c33aa92bfb71a59f7c784.zip
fix x coordinate out of range bug
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1557 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator/ppmcie.c')
-rw-r--r--generator/ppmcie.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generator/ppmcie.c b/generator/ppmcie.c
index ee742767..69af5732 100644
--- a/generator/ppmcie.c
+++ b/generator/ppmcie.c
@@ -463,11 +463,11 @@ gamma_correct_rgb(const struct colorSystem * const cs,
 
 
 
-/* Sz(X) is the length in pixels of a normalized distance of length X.
-   (A normalized length unit is 1/512 of the smaller dimension of the
-   canvas)
+/* Sz(X) is the displacement in pixels of a displacement of X normalized
+   distance units.  (A normalized distance unit is 1/512 of the smaller
+   dimension of the canvas)
 */
-#define Sz(x) (((x) * MIN(pixcols, pixrows)) / 512)
+#define Sz(x) (((x) * (int)MIN(pixcols, pixrows)) / 512)
 
 /* B(X, Y) is a pair of function arguments (for a libppmd function) that
    give a pixel position on the canvas.  That position is (X, Y), biased