init output map in some way

This commit is contained in:
Gregory 2016-12-22 05:44:09 +02:00
parent 7eb11a8333
commit c79d2bbea0

View file

@ -211,6 +211,9 @@ void print_solution(t_list *sol, t_node *root, int amount)
map_size = root->size * root->size + 1; map_size = root->size * root->size + 1;
map = malloc(sizeof(char) * map_size); map = malloc(sizeof(char) * map_size);
// init with zeroes by ft_memalloc
// or in some other way.
// map can contain garbage
map[map_size] = 0; map[map_size] = 0;
while (sol) while (sol)
{ {