From 04a2781b0aeaef3748e6fac95738dd55a90c53a4 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:56:03 +0200 Subject: [PATCH] domaca_uloha_7 --- du7/snake.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/du7/snake.c b/du7/snake.c index 02be7e7..ead8adf 100644 --- a/du7/snake.c +++ b/du7/snake.c @@ -7,9 +7,9 @@ struct snake* add_snake(struct snake* snake,int x,int y){ novyZaciatok->y = y; if (snake != NULL) { - snake->next = novyZaciatok; + novyZaciatok->next = snake; } else { - snake->next = NULL; + novyZaciatok->next = NULL; } return novyZaciatok;