Fix bitstream generator collision check
This commit is contained in:
parent
29efb7446b
commit
9a06c054e8
@ -286,6 +286,8 @@ int fpga_cell_bitstream_set_bit(char *buffer, char *sbuffer,
|
|||||||
bitno = 7 - (bit % 8);
|
bitno = 7 - (bit % 8);
|
||||||
byteno = bit / 8;
|
byteno = bit / 8;
|
||||||
|
|
||||||
|
value = !!value; /* Make sure it's a proper boolean value */
|
||||||
|
|
||||||
if ((sbuffer[byteno] & (1 << bitno))) { /* Already set */
|
if ((sbuffer[byteno] & (1 << bitno))) { /* Already set */
|
||||||
return value == !((buffer[byteno] & (1 << bitno)));
|
return value == !((buffer[byteno] & (1 << bitno)));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user