From c79d2bbea0e11194fc4f714d67c36e101fcf448f Mon Sep 17 00:00:00 2001 From: Gregory Date: Thu, 22 Dec 2016 05:44:09 +0200 Subject: [PATCH] init output map in some way --- src/dancing_links.c | 3 +++ 1 file changed, 3 insertions(+) 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) {