This commit is contained in:
Maksym Kovalchuk 2026-04-16 15:16:00 +00:00
parent 37816a8709
commit 8352be6eb9

View File

@ -18,7 +18,8 @@ Tree* readTree() {
if (fgets(line, SIZE, stdin) == NULL) return NULL;
// якщо пустий рядок → кінець бази
if (strcmp(line, "\n") == 0) return NULL;
line[strcspn(line, "\r\n")] = 0;
if (line[0] == '\0') return NULL;
Tree *node = malloc(sizeof(Tree));
node->yes = NULL;