diff --git a/src/tiff/tiffread.c b/src/tiff/tiffread.c index c976c2b..9a371e8 100644 --- a/src/tiff/tiffread.c +++ b/src/tiff/tiffread.c @@ -131,11 +131,13 @@ Image *read_baseline_tiff(const char *file, Arena *arena) { assert((reader.img.type == TIFF_IMAGE_TYPE_RGB) && "Currently, only RGB images are supported"); - assert((reader.img.rgba_bits_per_sample.r == MIN_BITS_PER_SAMPLE && - reader.img.rgba_bits_per_sample.g == MIN_BITS_PER_SAMPLE && - reader.img.rgba_bits_per_sample.b == MIN_BITS_PER_SAMPLE && - reader.img.rgba_bits_per_sample.a == MIN_BITS_PER_SAMPLE) && - "Currently, only 8-bit images are supported"); + + bool image_is_8_bit = + (reader.img.rgba_bits_per_sample.r == MIN_BITS_PER_SAMPLE && + reader.img.rgba_bits_per_sample.g == MIN_BITS_PER_SAMPLE && + reader.img.rgba_bits_per_sample.b == MIN_BITS_PER_SAMPLE && + reader.img.rgba_bits_per_sample.a == MIN_BITS_PER_SAMPLE); + assert(image_is_8_bit && "Currently, only 8-bit images are supported"); load_image_pixels(&reader, temp_arena); if (!reader.pixels) {