pyftdi
pyftdi copied to clipboard
BitSequence:_update_length() can result in _seq larger than length
If a BitSequence is instantiated from a bytearray and a length between len(bytearray) * 8 and (len(bytearray) - 1) * 8, the returned BitSequence has len(BitSequence) that doesn't match length.
ba = bytearray(b'\x01\x01') bs = BitSequence(bytes_=foo, length=10) len(bs) # returns 16, should return 10
I have not use MPPSE/JTAG for a very long time w/ PyFtdi.
I would likely accept patches through pull request, as long as there is a test that demonstrates the validity of the change (or the actual behavior being incorrect), as I do not have a way to validate the changes otherwise.
Thanks.