From 0ca453d4ca0ce0466a35e215a6cbc86a8f56217f Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Tue, 27 Apr 2021 17:34:37 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du7/snake.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du7/snake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/du7/snake.c b/du7/snake.c index 8447a40..04f789f 100644 --- a/du7/snake.c +++ b/du7/snake.c @@ -84,7 +84,7 @@ int step_state(struct state* st){ } } - for(struct snake* temp = st->snake->next != NULL; temp = temp->next){ + for(struct snake* temp = st->snake; temp != NULL; temp = temp->next){ if((nx == temp->x && ny == temp->y) || (nx < 0 || nx >= st->width || ny < 0 || ny >= st->height)){ return END_SNAKE; }