Update 'cv8/program.c'

This commit is contained in:
Anzhelika Nikolaieva 2023-11-24 22:24:21 +00:00
parent fbf9870e24
commit 13a0bde2d3

View File

@ -25,6 +25,11 @@ struct tree* read_tree(int* counter) {
char* r = fgets(buffer, SIZE, stdin);
assert(r);
if(r == NULL){
printf("Koniec vstupu\n");
exit(0);
}
struct tree* node = calloc(1, sizeof(struct tree));
memcpy(node->v, buffer, SIZE);