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;