Skip to content

Commit 8f9673e

Browse files
committed
bcdec: Fix logic for detecting incomplete blocks
1 parent 19e003b commit 8f9673e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/bcdec/image_decompress_bcdec.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void decompress_image(BCdecFormat format, const void *src, void *dst, con
6464
const uint32_t yblock = MIN(height - y, 4ul); \
6565
const uint32_t xblock = MIN(width - x, 4ul); \
6666
\
67-
const bool incomplete = yblock < 4 && xblock < 4; \
67+
const bool incomplete = yblock < 4 || xblock < 4; \
6868
uint8_t *dec_out = incomplete ? output : &dec_blocks[y * 4 * width + x * color_bytesize]; \
6969
\
7070
func(&src_blocks[src_pos], dec_out, 4 * color_components); \

0 commit comments

Comments
 (0)