From c48f98cfb202937555d0e1d9940972fdd249edbc Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Tue, 20 Aug 2024 15:12:10 +0200 Subject: [PATCH] Fix for a comparison always false Fixes #458 comparison is always false due to limited range of data type --- src/cmscgats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmscgats.c b/src/cmscgats.c index ae2f63cb..5f12792c 100644 --- a/src/cmscgats.c +++ b/src/cmscgats.c @@ -1614,8 +1614,8 @@ cmsInt32Number satoi(const char* b) if (b == NULL) return 0; n = atoi(b); - if (n > 0x7fffffffL) return 0x7fffffffL; - if (n < -0x7ffffffeL) return -0x7ffffffeL; + if (n > 0x7ffffff0L) return 0x7ffffff0L; + if (n < -0x7ffffff0L) return -0x7ffffff0L; return (cmsInt32Number)n; }