From 793d826d9df67c3f544505beda63ca36d8dfa1c4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 1 Sep 2017 10:10:51 +1000 Subject: py/modstruct: In struct.pack, stop converting if there are no args left. This patch makes a repeat counter behave the same as repeating the typecode, when there are not enough args. For example: struct.pack('2I', 1) now behave the same as struct.pack('II', 1). --- tests/basics/struct_micropython.py.exp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/basics/struct_micropython.py.exp') diff --git a/tests/basics/struct_micropython.py.exp b/tests/basics/struct_micropython.py.exp index 0ca95142b..55b7b6623 100644 --- a/tests/basics/struct_micropython.py.exp +++ b/tests/basics/struct_micropython.py.exp @@ -1 +1,2 @@ True +b'\x01\x00\x00\x00\x00\x00\x00\x00' -- cgit v1.2.3