summaryrefslogtreecommitdiff
path: root/modules/bmp
diff options
context:
space:
mode:
authorSaracen <SaracenOne@gmail.com>2018-07-08 18:51:20 +0100
committerSaracen <SaracenOne@gmail.com>2018-07-08 18:51:20 +0100
commit115f6d14a0c1e6e108ea4b91179357eedea32173 (patch)
treec25c26f77e74560fcad83f6f744403b754dd838a /modules/bmp
parentecee0c92ff86911fa50e745b4ab98196e0d2afe4 (diff)
Fix bits_per_pixel validation in BMP and TGA loader modules.
Diffstat (limited to 'modules/bmp')
-rw-r--r--modules/bmp/image_loader_bmp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/bmp/image_loader_bmp.cpp b/modules/bmp/image_loader_bmp.cpp
index 769119a0dc..919731b52b 100644
--- a/modules/bmp/image_loader_bmp.cpp
+++ b/modules/bmp/image_loader_bmp.cpp
@@ -53,7 +53,7 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
err = FAILED;
}
- if (bits_per_pixel != 24 || bits_per_pixel != 32) {
+ if (!(bits_per_pixel == 24 || bits_per_pixel == 32)) {
err = FAILED;
}