Commit 85cec74012ab54ced495bf3c83fdaee4836a734d

Thomas de Grivel 2024-08-27T17:14:13

wip segv

diff --git a/libkc3/env.c b/libkc3/env.c
index 5d175a0..610b7ee 100644
--- a/libkc3/env.c
+++ b/libkc3/env.c
@@ -1764,7 +1764,7 @@ bool env_eval_quote_unquote (s_env *env, const s_unquote *unquote, s_tag *dest)
 
 bool env_eval_struct (s_env *env, const s_struct *s, s_struct *dest)
 {
-  const void *data;
+  const void *data = NULL;
   uw i;
   s_tag tag = {0};
   s_struct tmp = {0};
diff --git a/libkc3/tag.c b/libkc3/tag.c
index 11049ea..b8a75f2 100644
--- a/libkc3/tag.c
+++ b/libkc3/tag.c
@@ -530,8 +530,7 @@ s_tag * tag_init_copy (s_tag *tag, const s_tag *src)
     var_init_copy(&tag->data.var, &src->data.var);
     return tag;
   case TAG_VOID:
-    tag_init_void(tag);
-    return tag;
+    return tag_init_void(tag);
   }
   err_puts("tag_init_copy: invalid tag type");
   assert(! "tag_init_copy: invalid tag type");