Fix bitstream generator collision check

This commit is contained in:
Markus Koch 2019-06-29 12:37:59 +02:00
parent 29efb7446b
commit 9a06c054e8

View File

@ -286,6 +286,8 @@ int fpga_cell_bitstream_set_bit(char *buffer, char *sbuffer,
bitno = 7 - (bit % 8);
byteno = bit / 8;
value = !!value; /* Make sure it's a proper boolean value */
if ((sbuffer[byteno] & (1 << bitno))) { /* Already set */
return value == !((buffer[byteno] & (1 << bitno)));
} else {