Browse Source

Change makeMapCapacity with malloc instead of realloc

pull/21/head
mtardy 4 years ago
parent
commit
16f8bf6adb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      object.c

+ 1
- 1
object.c View File

@ -360,7 +360,7 @@ oop makeMap()
oop makeMapCapacity(size_t capa)
{
oop map= makeMap();
set(map, Map, elements, realloc(get(map, Map, elements), sizeof(struct Pair) * capa));
set(map, Map, elements, malloc(sizeof(struct Pair) * capa));
set(map, Map, capacity, capa);
return map;
}

Loading…
Cancel
Save