fixed an issue in the itoa implementation for base > 10 #10
This commit is contained in:
parent
4546cdf9bd
commit
8078a436e8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user