diff --git a/cv8/program.c b/cv8/program.c index fe06d0f..1522de0 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -49,8 +49,9 @@ struct tree* search(struct tree* this){ }*/ char c = getchar(); char buffer[50]; - buffer[strlen(buffer)-1]='\0'; - + memset(buffer, 0, 50); + int x = strlen(buffer); + buffer[x-1]='\0'; memcpy(buffer, this->value, 50); //printf("%s\n", buffer); if(buffer[0] != '*'){