diff --git a/cv8/program.c b/cv8/program.c index 772d9ca..d5fb57e 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -44,7 +44,7 @@ struct binary* createBinary(char* name){ * @return – NULL if the node was not yet added, pointer to the new node if the node was added. */ struct binary* productAppend(struct binary* myTree, char* product){ - if(!myTree || (myTree->right != NULL && myTree->left != NULL) && (myTree->left->value[0] == '*' && myTree->right->value[0] == '*')) + if(!myTree || ((myTree->right != NULL && myTree->left != NULL) && (myTree->left->value[0] == '*' && myTree->right->value[0] == '*'))) return NULL; struct binary* itrNode = myTree; @@ -113,6 +113,8 @@ struct binary* questionAppend(struct binary* myTree, char* question){ endingFound = true; return itrNode2; } + + return NULL; }