We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d60afe1 commit 20f3bceCopy full SHA for 20f3bce
src/ax_interface/encodings.py
@@ -313,9 +313,9 @@ def to_bytes(self, endianness):
313
314
typed_bind = constants.ValueType(self.type_)
315
if typed_bind in self.FOUR_BYTE_TYPES:
316
- byte_string += struct.pack(endianness + 'L', self.data)
+ byte_string += struct.pack(endianness + 'L', self.data & 0x00000000ffffffff)
317
elif typed_bind == constants.ValueType.COUNTER_64:
318
- byte_string += struct.pack(endianness + 'Q', self.data)
+ byte_string += struct.pack(endianness + 'Q', self.data & 0xffffffffffffffff)
319
elif typed_bind == constants.ValueType.OBJECT_IDENTIFIER or typed_bind in self.OCTET_STRINGS:
320
byte_string += self.data.to_bytes(endianness)
321
elif typed_bind in self.EMPTY_TYPES:
0 commit comments