Strange... it can't convert INT_MIN but it can convert INT_MIN+1... also it can convert INT_MAX.

Code:

char* myitoa(int number,char* buffer,int radix){
int n,num;
bool negative=false;
char temp[32];
radix%=37;
if(buffer==NULL){
return NULL;
}
if(number==0){
buffer[0]='0';
buffer[1]='\0';
return buffer;
}
if(number<0){
if(radix==10){ negative=true; }
number*=-1;
}
for(n=0;number>0;n++){
num=number%radix;
temp[n]=num+0x30;
if(num>9){
temp[n]+=7;
}
number/=radix;
}
if(!n){ temp[n]='\0';n++; }
if(negative){
temp[n]='-';
n++;
}
for(int i=0;i<n;i++){
buffer[n-1-i]=temp[i];
}
buffer[n]='\0';
return buffer;
}