]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add missing brackets
authorBastian Dehn <hhaalo@arcor.de>
Sat, 15 Feb 2025 10:00:44 +0000 (11:00 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 15 Feb 2025 10:00:44 +0000 (11:00 +0100)
src/kds_s2000w_image_converter_netpbm.c

index 1ec6a962920f8d252ab345e87da119b1a760bf96..da5a6cf31842e4ae016e024d5005a6cf3ada2496 100644 (file)
@@ -177,7 +177,7 @@ void _kds_s2000w_image_converter_set_pixels(uint8_t data_byte, xel* pixels)
        uint8_t bit = 0;
        int32_t last_idx = BYTE_BITS - 1;
        for (uint32_t i = 0; i < BYTE_BITS; i++) {
-               bit = data_byte >> last_idx - i & 1;
+               bit = data_byte >> (last_idx - i) & 1;
                if (bit == 0)
                        pixels[i].b = PNM_MAXMAXVAL;
        }