diff --git a/include/private/vkd3d_memory.h b/include/private/vkd3d_memory.h index e191dc11..b157fc07 100644 --- a/include/private/vkd3d_memory.h +++ b/include/private/vkd3d_memory.h @@ -43,7 +43,7 @@ static inline void *vkd3d_realloc(void *ptr, size_t size) static inline void *vkd3d_calloc(size_t count, size_t size) { void *ptr; - VKD3D_ASSERT(count <= ~(size_t)0 / size); + VKD3D_ASSERT(!size || count <= ~(size_t)0 / size); if (!(ptr = calloc(count, size))) ERR("Out of memory.\n"); return ptr;