This commit is contained in:
Bohdan Kapliuk 2024-11-14 14:30:51 +02:00
parent a5c51c9f05
commit 4022194ae5

View File

@ -14,10 +14,10 @@ struct tree* read_tree(int* counter) {
char buffer[SIZE];
memset(buffer, 0, SIZE);
char* r = fgets(buffer, SIZE, stdin);
if (buffer[0] == '\n'){
if(r == NULL){
printf("Expert z bufetu to vie.\n");
printf("Chybna databaza\n");
return 0;
return NULL;
}
if (buffer[0] == '\n') {
return NULL;