diff --git a/src/common/mipmap_cache.c b/src/common/mipmap_cache.c index 741598d3c6b4..58a360f4bb53 100644 --- a/src/common/mipmap_cache.c +++ b/src/common/mipmap_cache.c @@ -461,7 +461,7 @@ void dt_mipmap_cache_init(dt_mipmap_cache_t *cache) // we want at least 100MB, and consider 8G just still reasonable. int64_t cache_memory = dt_conf_get_int64("cache_memory"); int worker_threads = dt_conf_get_int("worker_threads"); - size_t max_mem = CLAMPS(cache_memory, 100u << 20, ((uint64_t)8) << 30); + size_t max_mem = CLAMPS(cache_memory, 100u << 20, ((size_t)8) << 30); const uint32_t parallel = CLAMP(worker_threads, 1, 8); // Fixed sizes for the thumbnail mip levels, selected for coverage of most screen sizes