From 6ef3d20fb126a277a52e99b8b96bed1eb44d4212 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 0e047b89c..6bd9e1297 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -607,8 +607,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)));