From d867e4952f61667c046753e400a3016459d0788c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Vasi=C4=BE?= Date: Tue, 26 Apr 2022 21:37:41 +0200 Subject: [PATCH] domaca_uloha_7 --- du7/snake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/du7/snake.c b/du7/snake.c index 6f8de67..d837b78 100644 --- a/du7/snake.c +++ b/du7/snake.c @@ -31,7 +31,7 @@ struct snake* remove_snake(struct snake* snake){ snake = snake->next; if (snake->next->next == NULL) break; } - free(snake->next->next); + free(snake->next); snake->next = NULL; snake = medzipamat;