diff --git a/src/infuse_iot/util/ctypes.py b/src/infuse_iot/util/ctypes.py index e77602c..489770c 100644 --- a/src/infuse_iot/util/ctypes.py +++ b/src/infuse_iot/util/ctypes.py @@ -65,6 +65,7 @@ class property is not `None`, it will consume the remainder of if sub_count < 0: # Assume that negative length is an error code and use 0 vla_val.append(sub_base) + sub_vla_size = 0 else: sub_vla_type = sub_count * sub_array_base # Don't use ctypes.sizeof on constructed type, it returns the wrong value