Fix bits_per_pixel validation in BMP and TGA loader modules.

This commit is contained in:
Saracen
2018-07-08 18:51:20 +01:00
parent ecee0c92ff
commit 115f6d14a0
2 changed files with 3 additions and 2 deletions

View File

@@ -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;
}