From cfe21031584d6f56e9d188a879b2b6bc96205e3f Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Thu, 3 Dec 2020 15:22:47 +0100 Subject: [PATCH] telegrafista --- a5/program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/a5/program.c b/a5/program.c index 06fd4c2..7feec24 100644 --- a/a5/program.c +++ b/a5/program.c @@ -59,12 +59,12 @@ void search(struct morsetree* root, char* decode){ struct morsetree* this = root; int i = 0; for(i == 0; i <= strlen(decode); i++){ - if((i == strlen(decode) && decode[strlen(decode)-1] == ' ') || + /*if((i == strlen(decode) && decode[strlen(decode)-1] == ' ') || (i == strlen(decode) && decode[strlen(decode)-1] == '/' && decode[strlen(decode)-2] == ' ')){ printf("\n"); return; - } + }*/ if(decode[i] == ' ' || decode[i] == '\n' || decode[i] == '\0'){ printf("%c", this->letter); this = root; @@ -72,7 +72,7 @@ void search(struct morsetree* root, char* decode){ if(decode[i] == '/'){ printf(" "); } - else{ + else if(decode[i] != ' '){ if(decode[i] == '.'){ this = this->dot; } @@ -82,7 +82,7 @@ void search(struct morsetree* root, char* decode){ } } - printf("\n"); + //printf("\n"); }