diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-08-27 17:48:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-27 17:48:41 +0200 |
commit | 66778eae7123ddc25f1686066a54e4d2e3f9d76a (patch) | |
tree | 0de42bf33ddfe42e95becd2960d62d51a133033e /modules/cvtt/image_compress_cvtt.cpp | |
parent | f06b7d40c87e6a2435cdfcad6bb620184f16ea42 (diff) | |
parent | de2a36505a9656c6abcd01d3f914a644175a4ced (diff) |
Merge pull request #21420 from elasota/fix-last-mipmap
Fix uninitialized mipmap levels
Diffstat (limited to 'modules/cvtt/image_compress_cvtt.cpp')
-rw-r--r-- | modules/cvtt/image_compress_cvtt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |