From c4bc6fada751acd9bc0b82f0f29f6d8396938a60 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Sun, 22 Nov 2020 18:17:24 +0100 Subject: [PATCH] buffet --- cv8/program.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); }