From de2a36505a9656c6abcd01d3f914a644175a4ced Mon Sep 17 00:00:00 2001 From: elasota Date: Sat, 25 Aug 2018 16:39:43 -0400 Subject: Fix mipmap levels not being initialized --- modules/cvtt/image_compress_cvtt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/cvtt') diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index 3a371c8597..af92861352 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -247,8 +247,8 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::CompressS } dst_ofs += (MAX(4, bw) * MAX(4, bh)) >> shift; - w >>= 1; - h >>= 1; + w = MAX(w / 2, 1); + h = MAX(h / 2, 1); } if (num_job_threads > 0) { -- cgit v1.2.3