diff --git a/cv8/program.c b/cv8/program.c index ec6fadd..4d2710a 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -42,9 +42,9 @@ struct tree* read_tree(int* counter){ } if(*c == 1){ r = fgets(buffer,50, stdin); - //int x = strlen(buffer); - // buffer[x-1]='\0'; - if(buffer[0] != '\n'){ + int x = strlen(buffer); + buffer[x-1]='\0'; + if(buffer[0] != '\0'){ printf("Chybna databaza\n"); exit(0); }