diff options
| author | Damien George <damien.p.george@gmail.com> | 2019-09-02 12:57:51 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2019-09-02 13:14:16 +1000 |
| commit | 24c3e9b283da26093ca653fc6b441042fedec135 (patch) | |
| tree | 430cf3923afccc874902bebecb79f5b22572777c /extmod | |
| parent | 1022f9cc35564b216a4bcd7c65e8243c810a0ca9 (diff) | |
py/modstruct: Fix struct.pack_into with unaligned offset of native type.
Following the same fix for unpack.
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/moductypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c index d4c7611df..cf83f43e3 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -305,7 +305,7 @@ static inline mp_obj_t get_unaligned(uint val_type, byte *p, int big_endian) { static inline void set_unaligned(uint val_type, byte *p, int big_endian, mp_obj_t val) { char struct_type = big_endian ? '>' : '<'; static const char type2char[16] = "BbHhIiQq------fd"; - mp_binary_set_val(struct_type, type2char[val_type], val, &p); + mp_binary_set_val(struct_type, type2char[val_type], val, p, &p); } static inline mp_uint_t get_aligned_basic(uint val_type, void *p) { |
