87
This commit is contained in:
parent
5891f836d7
commit
5188465dc6
@ -115,7 +115,21 @@ int main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char dummy[LINE_SIZE];
|
char dummy[LINE_SIZE];
|
||||||
fgets(dummy, sizeof(dummy), stdin);
|
if (fgets(dummy, sizeof(dummy), stdin) == NULL) {
|
||||||
|
printf("Expert z bufetu to vie.\n");
|
||||||
|
printf("Chybna databaza\n");
|
||||||
|
cleanup_tree(root);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dummy[strcspn(dummy, "\n\r")] = '\0';
|
||||||
|
|
||||||
|
if (strlen(dummy) != 0) {
|
||||||
|
printf("Expert z bufetu to vie.\n");
|
||||||
|
printf("Chybna databaza\n");
|
||||||
|
cleanup_tree(root);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int answer_count = how_many_answers(root);
|
int answer_count = how_many_answers(root);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user