This commit is contained in:
Bohdan Kapliuk 2024-11-11 18:58:44 +02:00
parent 2adc3595d9
commit 8d15749214

View File

@ -15,7 +15,8 @@ struct tree* read_tree(int* counter) {
memset(buffer, 0, SIZE); memset(buffer, 0, SIZE);
char* r = fgets(buffer, SIZE, stdin); char* r = fgets(buffer, SIZE, stdin);
if (buffer[0] == '\n') { if (buffer[0] == '\n') {
return NULL; printf("Chybna databaza\n");
return 0;
} }
struct tree* tree = calloc(1, sizeof(struct tree)); struct tree* tree = calloc(1, sizeof(struct tree));
tree->value = malloc(strlen(buffer) + 1); tree->value = malloc(strlen(buffer) + 1);