diff --git a/src/dancing_links.c b/src/dancing_links.c index 27271bb..877c7ec 100644 --- a/src/dancing_links.c +++ b/src/dancing_links.c @@ -211,6 +211,9 @@ void print_solution(t_list *sol, t_node *root, int amount) map_size = root->size * root->size + 1; 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; while (sol) {