diff --git a/a5/program.c b/a5/program.c index 7feec24..106d327 100644 --- a/a5/program.c +++ b/a5/program.c @@ -65,7 +65,7 @@ void search(struct morsetree* root, char* decode){ printf("\n"); return; }*/ - if(decode[i] == ' ' || decode[i] == '\n' || decode[i] == '\0'){ + if(decode[i+1] == ' ' || decode[i+1] == '\n' || decode[i+1] == '\0'){ printf("%c", this->letter); this = root; }