diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-04-21 16:40:57 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-04-21 16:43:21 +0300 |
commit | 9e8f3163924c1f429f16f44a4a27b0cd33064719 (patch) | |
tree | 0ae3ee37e882ed9f34dabdfc3925efa3ea8865d0 /py | |
parent | 3e5cd35a9f6b2877f72f4af6865f14363826de4c (diff) | |
download | micropython-9e8f3163924c1f429f16f44a4a27b0cd33064719.tar.gz micropython-9e8f3163924c1f429f16f44a4a27b0cd33064719.zip |
extmod/moductypes: Fix bigint handling for 32-bit ports.
Diffstat (limited to 'py')
-rw-r--r-- | py/objint_mpz.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/objint_mpz.c b/py/objint_mpz.c index 2353bd8d68..d818b6f407 100644 --- a/py/objint_mpz.c +++ b/py/objint_mpz.c @@ -116,6 +116,7 @@ mp_obj_t mp_obj_int_from_bytes_impl(bool big_endian, size_t len, const byte *buf void mp_obj_int_to_bytes_impl(mp_obj_t self_in, bool big_endian, size_t len, byte *buf) { assert(MP_OBJ_IS_TYPE(self_in, &mp_type_int)); mp_obj_int_t *self = MP_OBJ_TO_PTR(self_in); + memset(buf, 0, len); mpz_as_bytes(&self->mpz, big_endian, len, buf); } |