From bc2ed8c55a69d80ea6aa8441673232a8c4054f13 Mon Sep 17 00:00:00 2001 From: Duncan Lowther Date: Wed, 14 Jun 2023 15:29:39 +0100 Subject: [PATCH] tests/extmod/uctypes_array_assign_le: Fix buffer. 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 --- tests/extmod/uctypes_array_assign_le.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/extmod/uctypes_array_assign_le.py b/tests/extmod/uctypes_array_assign_le.py index d822faf7e8..b7fcdfb49c 100644 --- a/tests/extmod/uctypes_array_assign_le.py +++ b/tests/extmod/uctypes_array_assign_le.py @@ -18,7 +18,7 @@ desc = { "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)