diff --git a/du6/program.c b/du6/program.c index 6bdae7b..bef5c6d 100644 --- a/du6/program.c +++ b/du6/program.c @@ -47,9 +47,9 @@ bool find_the_incorrect(struct tree* tree) { if (tree == NULL) return false; - if (tree->value && - (strcspn(tree->value, "*") != strlen(tree->value) && - strcspn(tree->value, "?") != strlen(tree->value))) { + if + ((strcspn(tree->value, "*") != strlen(tree->value) && + strcspn(tree->value, "?") != strlen(tree->value)) || (strcspn(tree->value, ".") != strlen(tree->value) )) { return true; }