2017-02-07 15:55:37 +11:00
|
|
|
"""
|
|
|
|
categories: Modules,struct
|
|
|
|
description: Struct pack with too few args, not checked by uPy
|
|
|
|
cause: Unknown
|
|
|
|
workaround: Unknown
|
|
|
|
"""
|
|
|
|
import struct
|
2021-03-15 19:27:36 +05:30
|
|
|
|
2017-02-07 15:55:37 +11:00
|
|
|
try:
|
2021-03-15 19:27:36 +05:30
|
|
|
print(struct.pack("bb", 1))
|
|
|
|
print("Should not get here")
|
2017-02-07 15:55:37 +11:00
|
|
|
except:
|
2021-03-15 19:27:36 +05:30
|
|
|
print("struct.error")
|