From 6f4ea44c71441e88f269fc28e2b18ba0ffc7ec8f Mon Sep 17 00:00:00 2001 From: Michal Utlak Date: Tue, 9 Apr 2024 16:40:49 +0200 Subject: [PATCH] hlavicka --- cv9/snake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cv9/snake.c b/cv9/snake.c index 98c45c0..92baaf5 100644 --- a/cv9/snake.c +++ b/cv9/snake.c @@ -2,7 +2,7 @@ #include struct snake* add_snake(struct snake* snake,int x,int y){ - struct snake* hlavicka = (struct snake*)malloc(sizeof(struct snake)); + struct snake* hlavicka = calloc(1,sizeof(struct snake)); if (hlavicka == NULL) { return NULL; }