du6 - 16
This commit is contained in:
parent
388cc3b02d
commit
f6246bb5ef
@ -58,6 +58,17 @@ Tree* read_tree() {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// kontrola prebytocnych potomkov
|
||||||
|
long pos = ftell(stdin);
|
||||||
|
|
||||||
|
if (fgets(buffer, SIZE, stdin)) {
|
||||||
|
// ak sa nacitalo ine nez prazdny riadok → chyba
|
||||||
|
if (strcmp(buffer, "\n") != 0) {
|
||||||
|
valid_db = 0;
|
||||||
|
}
|
||||||
|
fseek(stdin, pos, SEEK_SET);
|
||||||
|
}
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user