diff --git a/src/conversionOfNumbers/conversionOfNumbers.c b/src/conversionOfNumbers/conversionOfNumbers.c index 0d828bc..456801d 100644 --- a/src/conversionOfNumbers/conversionOfNumbers.c +++ b/src/conversionOfNumbers/conversionOfNumbers.c @@ -64,7 +64,7 @@ int hexStrLen(int input){ } char* convertIntToHex(int input){ - int length = 1; + int length = hexStrLen(input); int rest; char* result = (char*)malloc(sizeof(char) * length + 1); result[length] = '\0';