From 40dcf4a2e75b497f4147547a880c57bc8e14a6aa Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 30 Sep 2017 17:21:10 -0300 Subject: Change to shrink_x2 function preventing it set a 0 width/height --- core/image.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/image.cpp b/core/image.cpp index 70a7b2bceb..c7f21d5599 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -1013,8 +1013,8 @@ void Image::shrink_x2() { copymem(w.ptr(), &r[ofs], new_size); } - width /= 2; - height /= 2; + width = MAX(width / 2, 1); + height = MAX(height / 2, 1); data = new_img; } else { -- cgit v1.2.3