diff --git a/cv9/snake.c b/cv9/snake.c index 9852808..75614e6 100644 --- a/cv9/snake.c +++ b/cv9/snake.c @@ -37,7 +37,7 @@ void free_snake(struct snake* sn){ int is_snake(struct snake* snake,int x,int y){ struct snake* this = snake; - while (this->next != NULL){ + while (this != NULL){ if(this->x == x && this->y == y){ return 1;