# HG changeset patch
# User Edouard Tisserant <edouard.tisserant@gmail.com>
# Date 1689885759 -7200
# Node ID c7cc292bb82e957df28ee7b3cab73a1ec23556ab
# Parent  18aae6235e76b59a7afbcbca1b25c9ca3c23a98a
Runtime: fix unpacking of variable trace data

diff -r 18aae6235e76 -r c7cc292bb82e runtime/typemapping.py
--- a/runtime/typemapping.py	Thu Jul 20 22:05:31 2023 +0200
+++ b/runtime/typemapping.py	Thu Jul 20 22:42:39 2023 +0200
@@ -92,8 +92,8 @@
             size = sizeof(c_type)
 
         if c_type is not None and (buffoffset + size) <= buffsize:
-            n = cast(cursor, POINTER(c_type))
-            value = unpack_func(n)
+            ptr = cast(cursor, POINTER(c_type))
+            value = unpack_func(ptr.contents)
             if iectype not in ["BOOL", "DATE", "DT", "STRING", "TIME", "TOD"]:
                 value = value.value
             elif iectype == "STRING":