Ver a proveniência

Change makeMapCapacity with malloc instead of realloc

pull/21/head
mtardy há 4 anos
ascendente
cometimento
16f8bf6adb
1 ficheiros alterados com 1 adições e 1 eliminações
  1. +1
    -1
      object.c

+ 1
- 1
object.c Ver ficheiro

@ -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;
}

Carregando…
Cancelar
Guardar