summaryrefslogtreecommitdiff
path: root/source/gprf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-08-14 20:05:21 +0100
committerRobin Watts <robin.watts@artifex.com>2015-08-17 12:36:21 +0100
commit496d703c97c1fe7f99f28afca82696aeacbb5680 (patch)
treea81e4417f8dcc9f486d8b1c35c43785f67baf1bc /source/gprf
parentdda017988150901dccd6b9dcb2823d7d8522433b (diff)
downloadmupdf-496d703c97c1fe7f99f28afca82696aeacbb5680.tar.xz
GProof: Fix a potential signed/unsigned problem in CMYK conversion.
Not sure if this is actually an issue at the moment, but it potentially could be.
Diffstat (limited to 'source/gprf')
-rw-r--r--source/gprf/gprf-doc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c
index d0551816..5f5631aa 100644
--- a/source/gprf/gprf-doc.c
+++ b/source/gprf/gprf-doc.c
@@ -226,17 +226,17 @@ static inline unsigned char *cmyk_to_rgba(unsigned char *out, uint32_t c, uint32
b = k - y;
#endif
r >>= 8;
- if (r < 0)
+ if ((int)r < 0)
r = 0;
else if (r > 255)
r = 255;
g >>= 8;
- if (g < 0)
+ if ((int)g < 0)
g = 0;
else if (g > 255)
g = 255;
b >>= 8;
- if (b < 0)
+ if ((int)b < 0)
b = 0;
else if (b > 255)
b = 255;