From d5173645b0c1ba2a8e9d819feb5f69773a0cfae2 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Thu, 3 Dec 2020 15:17:47 +0100 Subject: [PATCH] telegrafista --- a5/program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/a5/program.c b/a5/program.c index abdcd6e..48cede5 100644 --- a/a5/program.c +++ b/a5/program.c @@ -59,7 +59,8 @@ 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)-1 && decode[strlen(decode)-2] == '/')){ printf("\n"); return; }