Explorar el Código

Change makeMapCapacity with malloc instead of realloc

pull/21/head
mtardy hace 4 años
padre
commit
16f8bf6adb
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      object.c

+ 1
- 1
object.c Ver fichero

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

Cargando…
Cancelar
Guardar