You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
opc_da: OpcDaFack(selack=None) now builds silently as zeros instead of failing (since #5095) #5201
Since #5095 ("opc_da: fix STDOBJREF IPID and Fack selack field types"), building an OpcDaFack with selack=None
succeeds and serializes the entry as zero bytes. Before #5095 the build failed with While building field 'selack': cannot convert 'NoneType' object to bytes.
This is an edge case and may well be acceptable; reporting it in case the silent zero value is not intended, since selack is a list of integers and None is not a valid entry.
selackLen stays 0, but the packet is 4 bytes longer than raw(OpcDaFack()) (17 bytes): the None entry is written as a zero integer, so the length field and the list disagree.
Expected result
An error for the invalid None entry, as before, or at least a length field consistent with the list.
Related resources
#5095 (cc @mmadersbacher). Found by differential testing of recent pull requests and reproduced by hand on current master.
Activity