fixed an issue in the itoa implementation for base > 10 #10

This commit is contained in:
prozessorkern 2019-06-24 18:54:35 +02:00
parent 4546cdf9bd
commit 8078a436e8

View File

@ -97,7 +97,7 @@ static uint32_t shellItoa(int32_t value, char *buffer, uint32_t base)
do
{
digitValue = (char) (value % base);
tempBuffer[i] = (digitValue < 10u) ? ('0' + digitValue) : ('A' + digitValue);
tempBuffer[i] = (digitValue < 10u) ? ('0' + digitValue) : (('A' - 10) + digitValue);
value /= base;
i ++;
}while(value > 0);