diff options
author | Gabriel <gabriel.formiga@gmail.com> | 2017-09-30 17:21:10 -0300 |
---|---|---|
committer | Gabriel <gabriel.formiga@gmail.com> | 2017-09-30 17:21:10 -0300 |
commit | 40dcf4a2e75b497f4147547a880c57bc8e14a6aa (patch) | |
tree | c72b38b88bade94474913a28ca9fa37fbd6fa51e | |
parent | 42e2821d04a5efd434fffa090e817905d30a0c73 (diff) |
Change to shrink_x2 function preventing it set a 0 width/height
-rw-r--r-- | core/image.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |