diff --git a/src/StringManipulation.c b/src/StringManipulation.c index 6f671da..cd2ad2c 100644 --- a/src/StringManipulation.c +++ b/src/StringManipulation.c @@ -11,13 +11,13 @@ char *to_string(int number) } else { - int cpy = number, len = 0; - while(number>0){ + int cpy = number, len = 0; + while(number>0){ ++len; number /= 10; - } - char *str = calloc(len+1, sizeof(char)); - for(int i=0,j=len-1;i