Initializacia
This commit is contained in:
parent
2da0b7a3e5
commit
b701fb7fdc
@ -32,10 +32,16 @@ struct tree* load_tree() {
|
||||
if (node->value[0] != '*') {
|
||||
node->left = load_tree();
|
||||
node->right = load_tree();
|
||||
|
||||
if (!node->left || !node->right) {
|
||||
destroy_tree(node);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
void run_tree(struct tree* tree) {
|
||||
if (!tree) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user