Commit 3e226657d814cee9e794f98ebb72aac449328433

Thomas de Grivel 2024-11-04T06:25:12

fix map access

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/libkc3/map.c b/libkc3/map.c
index 1a3b732..3ae6131 100644
--- a/libkc3/map.c
+++ b/libkc3/map.c
@@ -35,10 +35,9 @@ s_tag * map_access (const s_map *map, const s_list * const *key,
   first = &(*key)->tag;
   next = list_next(*key);
   if (! next) {
-    if (! map_get(map, first, dest)) {
+    if (! map_get(map, first, dest))
       tag_init_void(dest);
-      return dest;
-    }
+    return dest;
   }
   if (! map_get(map, first, &tag)) {
     err_write_1("map_access: map_get(");