diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2023-04-11 21:01:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 21:01:58 +0200 |
commit | 16a6bdd423aa85272837d0bc6b9e709febdb4ec0 (patch) | |
tree | a7f70f8ed81aec219e990c0b3f174dbd200ae793 /modules/svg/image_loader_svg.cpp | |
parent | 4762303f182e65c5293db8d22a4ce88521eba445 (diff) | |
parent | 177be9bd37e3dfa4d591eea3bb8ab14a17d06007 (diff) |
Merge pull request #75786 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 1st batch
Diffstat (limited to 'modules/svg/image_loader_svg.cpp')
-rw-r--r-- | modules/svg/image_loader_svg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp index e239b33374..ad7feeda49 100644 --- a/modules/svg/image_loader_svg.cpp +++ b/modules/svg/image_loader_svg.cpp @@ -79,8 +79,8 @@ Error ImageLoaderSVG::create_image_from_utf8_buffer(Ref<Image> p_image, const Pa float fw, fh; picture->size(&fw, &fh); - uint32_t width = round(fw * p_scale); - uint32_t height = round(fh * p_scale); + uint32_t width = MAX(1, round(fw * p_scale)); + uint32_t height = MAX(1, round(fh * p_scale)); const uint32_t max_dimension = 16384; if (width > max_dimension || height > max_dimension) { |