From 1fb1da956b6f26e512406bf53415aa8d38f85c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Vasi=C4=BE?= Date: Tue, 26 Apr 2022 19:46:44 +0200 Subject: [PATCH] domaca_uloha_7 --- du7/snake.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/du7/snake.c b/du7/snake.c index 9fbdebf..02be7e7 100644 --- a/du7/snake.c +++ b/du7/snake.c @@ -8,6 +8,8 @@ struct snake* add_snake(struct snake* snake,int x,int y){ if (snake != NULL) { snake->next = novyZaciatok; + } else { + snake->next = NULL; } return novyZaciatok;