diff --git a/du7/snake.c b/du7/snake.c index ead8adf..de14c16 100644 --- a/du7/snake.c +++ b/du7/snake.c @@ -2,7 +2,7 @@ #include struct snake* add_snake(struct snake* snake,int x,int y){ - struct snake* novyZaciatok; + struct snake* novyZaciatok = calloc(1, sizeof(struct snake)); novyZaciatok->x = x; novyZaciatok->y = y;