diff options
| author | Gabriel | 2017-09-30 17:21:10 -0300 |
|---|---|---|
| committer | Gabriel | 2017-09-30 17:21:10 -0300 |
| commit | 40dcf4a2e75b497f4147547a880c57bc8e14a6aa (patch) | |
| tree | c72b38b88bade94474913a28ca9fa37fbd6fa51e /core/image.cpp | |
| parent | 42e2821d04a5efd434fffa090e817905d30a0c73 (diff) | |
| download | godot-40dcf4a2e75b497f4147547a880c57bc8e14a6aa.tar.gz godot-40dcf4a2e75b497f4147547a880c57bc8e14a6aa.tar.zst godot-40dcf4a2e75b497f4147547a880c57bc8e14a6aa.zip | |
Diffstat (limited to 'core/image.cpp')
| -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 70a7b2bce..c7f21d559 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 { |
