Skip to content

Commit

Permalink
tests/extmod/uctypes_array_assign_le: Fix buffer.
Browse files Browse the repository at this point in the history
Structure descriptor in test extmod/uctypes_array_assign_le
is 6 bytes long, due to member "arr3" having length 4
(2 * UINT16) and offset 2, but only 5 bytes are allocated.
Increased buffer length to 6 bytes.

Signed-off-by: Duncan Lowther <Duncan.Lowther@glasgow.ac.uk>
  • Loading branch information
djlowther committed Jun 21, 2023
1 parent ae77836 commit bc2ed8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/extmod/uctypes_array_assign_le.py
Expand Up @@ -18,7 +18,7 @@
"arr8": (uctypes.ARRAY | 1, 1, {"l": uctypes.UINT32 | 0}),
}

data = bytearray(5)
data = bytearray(6)

S = uctypes.struct(uctypes.addressof(data), desc, uctypes.LITTLE_ENDIAN)

Expand Down

0 comments on commit bc2ed8c

Please sign in to comment.