summaryrefslogtreecommitdiff
path: root/modules/bmp/image_loader_bmp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bmp/image_loader_bmp.cpp')
-rw-r--r--modules/bmp/image_loader_bmp.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/bmp/image_loader_bmp.cpp b/modules/bmp/image_loader_bmp.cpp
index 919731b52b..063508a25f 100644
--- a/modules/bmp/image_loader_bmp.cpp
+++ b/modules/bmp/image_loader_bmp.cpp
@@ -42,12 +42,9 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
if (err == OK) {
size_t index = 0;
- size_t width =
- static_cast<size_t>(p_header.bmp_info_header.bmp_width < 0 ? -p_header.bmp_info_header.bmp_width : p_header.bmp_info_header.bmp_width);
- size_t height =
- static_cast<size_t>(p_header.bmp_info_header.bmp_height < 0 ? -p_header.bmp_info_header.bmp_height : p_header.bmp_info_header.bmp_height);
- size_t bits_per_pixel =
- static_cast<size_t>(p_header.bmp_info_header.bmp_bit_count);
+ size_t width = (size_t)p_header.bmp_info_header.bmp_width;
+ size_t height = (size_t)p_header.bmp_info_header.bmp_height;
+ size_t bits_per_pixel = (size_t)p_header.bmp_info_header.bmp_bit_count;
if (p_header.bmp_info_header.bmp_compression != 0) {
err = FAILED;