Commit b5741532118ef9e9b764cf6862eb34f7a4f9657f

Thomas de Grivel 2023-11-20T11:48:29

wip asan

diff --git a/libc3/env.c b/libc3/env.c
index 2e9e7d8..d2c73f0 100644
--- a/libc3/env.c
+++ b/libc3/env.c
@@ -610,9 +610,9 @@ bool env_eval_map (s_env *env, const s_map *map, s_tag *dest)
   assert(env);
   assert(map);
   assert(dest);
-  if (! map_copy(map, &tmp))
+  if (! map_init(&tmp, map->count))
     return false;
-  while (i < map->count) {
+  while (i < tmp.count) {
     if (! env_eval_tag(env, map->keys + i, tmp.keys + i) ||
         ! env_eval_tag(env, map->values + i, tmp.values + i))
       goto ko;
diff --git a/test/ic3_test b/test/ic3_test
index b80a024..f04ca74 100755
--- a/test/ic3_test
+++ b/test/ic3_test
@@ -70,7 +70,7 @@ fi
 echo
 printf "%s" "Total $TEST_COUNT tests. "
 printf "%s" "${TEST_COLOR_OK}OK $TEST_OK ($(($TEST_OK * 100 / $TEST_COUNT))%)${TEST_COLOR_RESET}. "
-echo "%s" "${TEST_COLOR_KO}KO $TEST_KO ($(($TEST_KO * 100 / $TEST_COUNT))%)${TEST_COLOR_RESET}."
+echo "${TEST_COLOR_KO}KO $TEST_KO ($(($TEST_KO * 100 / $TEST_COUNT))%)${TEST_COLOR_RESET}."
 
 if [ "x$TEST_KO" = "x0" ]; then
     exit 0