diff --git a/cv8/program.c b/cv8/program.c index 758caa4..f76a546 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -18,7 +18,11 @@ struct node* read_tree(int* count, int* leafs){ char buffer[SIZE]; memset(buffer,0,SIZE); char* r = fgets(buffer,SIZE,stdin); - assert(r); + if(r == NULL){ + puts("Expert z bufetu to vie."); + puts("Chybna databaza"); + exit(0); + } struct node* node = calloc(1,sizeof(struct node)); memcpy(node->data,buffer,SIZE); if(r[0]!='*'){