From ddd7189b39b8580192824e29fb443e509d047045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Fertyk?= Date: Tue, 20 Dec 2022 21:54:21 +0100 Subject: [PATCH] Fix `BitMap.resize` error spam Fixes #70187. --- scene/resources/bit_map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index 1b833b8325d..79d6b6c2060 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -606,8 +606,8 @@ void BitMap::resize(const Size2 &p_new_size) { Ref new_bitmap; new_bitmap.instance(); new_bitmap->create(p_new_size); - int lw = MIN(width, p_new_size.width); - int lh = MIN(height, p_new_size.height); + int lw = MIN(width, new_bitmap->width); + int lh = MIN(height, new_bitmap->height); for (int x = 0; x < lw; x++) { for (int y = 0; y < lh; y++) { new_bitmap->set_bit(Vector2(x, y), get_bit(Vector2(x, y)));