diff --git a/cv8/program.c b/cv8/program.c index a813874..5f58aa4 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -47,9 +47,6 @@ struct binary* itemAppend(struct binary* myTree, char* item){ if(!myTree || ((myTree->right != NULL && myTree->left != NULL) && (myTree->left->value[0] == '*' && myTree->right->value[0] == '*'))) return NULL; - if(!strcmp(item, "Je to zelene?")) - printf("ti"); - struct binary* itrNode = myTree; while(itrNode->left != NULL){ if(itrNode->left->value[0] != '*') @@ -100,14 +97,15 @@ int main() { if(usrIn[0] == '*') inputsAmount++; if(strlen(usrIn) > 1) - itemAppend(itrNode, usrIn); + if(!itemAppend(itrNode, usrIn)) + inputsAmount = -200; endingFound = false; } } printf("Expert z bufetu to vie.\n"); - if(inputsAmount == 0){ + if(inputsAmount <= 0){ printf("Chybna databaza\n"); return 0; }