This commit is contained in:
Josh Wu
2023-12-02 23:29:00 +08:00
parent 247cb89332
commit dc97be5b35
2 changed files with 10 additions and 1 deletions

View File

@@ -1629,7 +1629,7 @@ class HCI_Object:
field_bytes = bytes(field_value)
elif field_type == 'v':
# Variable-length bytes field, with 1-byte length at the beginning
field_bytes = bytes(field_bytes)
field_bytes = bytes(field_value)
field_length = len(field_bytes)
field_bytes = bytes([field_length]) + field_bytes
elif isinstance(field_value, (bytes, bytearray)) or hasattr(