diff --git a/magick/cache.c b/magick/cache.c
index d1eb7b0..9d320d7 100644
--- a/magick/cache.c
+++ b/magick/cache.c
@@ -5059,8 +5059,8 @@
x,
y;
- x=nexus_info->region.x+nexus_info->region.width-1;
- y=nexus_info->region.y+nexus_info->region.height-1;
+ x=nexus_info->region.x+(ssize_t) nexus_info->region.width-1;
+ y=nexus_info->region.y+(ssize_t) nexus_info->region.height-1;
if (((nexus_info->region.x >= 0) && (x < (ssize_t) cache_info->columns) &&
(nexus_info->region.y >= 0) && (y < (ssize_t) cache_info->rows)) &&
((nexus_info->region.height == 1UL) ||