Commit 315ac5b42a0721d82d4303766abfc87765f2755d

Thomas de Grivel 2024-08-30T18:01:43

wip struct

diff --git a/libkc3/env.c b/libkc3/env.c
index be72c54..04ee00e 100644
--- a/libkc3/env.c
+++ b/libkc3/env.c
@@ -1790,7 +1790,7 @@ bool env_eval_struct (s_env *env, const s_struct *s, s_struct *dest)
     }
     else if (! tag_type(tmp.type->map.value + i, &type))
       goto ko;
-    if (var && ! var->ptr) {
+    if (s->tag && var && ! var->ptr) {
       if (! env_eval_tag(env, s->tag + i,
                          (s_tag *) (s8 *) tmp.data +
                          tmp.type->offset[i]))
diff --git a/libkc3/sym.c b/libkc3/sym.c
index 3713a50..e11b7d1 100644
--- a/libkc3/sym.c
+++ b/libkc3/sym.c
@@ -1217,7 +1217,7 @@ uw * sym_type_size (const s_sym * const *type, uw *dest)
     return dest;
   }
   if (*type == &g_sym_Var) {
-    *dest = sizeof(s_tag);
+    *dest = sizeof(s_var);
     return dest;
   }
   if (*type == &g_sym_Void) {