From 195a2520540bea92d40a38692a88ba832ffef9b8 Mon Sep 17 00:00:00 2001 From: Kapliuk Date: Thu, 18 Apr 2024 16:51:51 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D0=B8=20'c?= =?UTF-8?q?v9/snake.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv9/snake.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv9/snake.c b/cv9/snake.c index 7cad4c4..a3eaa81 100644 --- a/cv9/snake.c +++ b/cv9/snake.c @@ -2,10 +2,10 @@ #include struct snake* add_snake(struct snake* snake,int x,int y){ - struct snake* head = calloc(1,sizeof(struct snake)); - if (head == NULL) { + if (snake == NULL) { return NULL; } + struct snake* head = calloc(1,sizeof(struct snake)); head->x = x; head->y = y; head->next = snake;