micropython / micropython-esp32

Old port of MicroPython to the ESP32 -- new port is at https://github.com/micropython/micropython
MIT License
673 stars 216 forks source link

py/binary.c: Bugfix for struct.pack('>Q', 16) #162

Closed basvs closed 7 years ago

basvs commented 7 years ago

Without bugfix:

struct.pack('>Q', 16)
b'\x00\x00\x00\x10\x00\x00\x00\x00'

With bugfix:

struct.pack('>Q', 16)
b'\x00\x00\x00\x00\x00\x00\x00\x10'
dpgeorge commented 7 years ago

Thanks for the fix! But please can you resubmit it upstream at https://github.com/micropython/micropython. Also, a test case added to tests/basics/struct1_intbig.py would be great.

basvs commented 7 years ago

Resubmitted upstream: https://github.com/micropython/micropython/pull/3264