diff --git a/src/conversionOfNumbers/conversionOfNumbers.c b/src/conversionOfNumbers/conversionOfNumbers.c index c71b53e..7bf51b2 100644 --- a/src/conversionOfNumbers/conversionOfNumbers.c +++ b/src/conversionOfNumbers/conversionOfNumbers.c @@ -20,8 +20,7 @@ int binaryStrLen(int input){ } char* convertIntToBinaryStr(int input){ - if(input > 3 || input < 0) return NULL; - int length = 2; + int length = binaryStrLen(input); int rest; char* result = (char*)malloc(sizeof(char) * length + 1); result[length] = '\0';