This commit is contained in:
mr314ot 2025-11-21 08:49:56 +01:00
parent 8bfed13581
commit 8b3336a34b

View File

@ -71,11 +71,15 @@ int run_system(Tree *node) {
char c[10];
printf("%s\n", node->value);
if (fgets(c, sizeof(c), stdin) == NULL) {
printf("Koniec vstupu\n");
return 0;
while (1) {
if (fgets(c, sizeof(c), stdin) == NULL) {
printf("Koniec vstupu\n");
return 0;
}
strip_newline(c);
if (strlen(c) != 0) break;
}
strip_newline(c);
if (!node->left && !node->right) {
printf("Koniec vstupu\n");