assert
This commit is contained in:
parent
af6540d032
commit
d34f15fb47
@ -1,5 +1,6 @@
|
||||
#include "snake.h"
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
struct snake* add_snake(struct snake* snake,int x,int y){
|
||||
struct snake* hlavicka = calloc(1,sizeof(struct snake));
|
||||
@ -20,7 +21,7 @@ struct snake* remove_snake(struct snake* snake){
|
||||
struct snake* nova_hlavicka = snake->next;
|
||||
|
||||
free(snake);
|
||||
|
||||
|
||||
assert(nova_hlavicka == NULL || nova_hlavicka->next == NULL);
|
||||
|
||||
return nova_hlavicka;
|
||||
|
Loading…
Reference in New Issue
Block a user