mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 04:15:26 +03:00
Fixes #3255
This commit is contained in:
parent
364bf6ac23
commit
7ebebb312a
7 changed files with 50 additions and 14 deletions
|
@ -155,13 +155,14 @@ char * strAppendNumber(char * dest, unsigned int value, uint8_t digits, uint8_t
|
|||
tmp /= radix;
|
||||
}
|
||||
}
|
||||
dest[digits] = '\0';
|
||||
while(digits > 0) {
|
||||
uint8_t idx = digits;
|
||||
while(idx > 0) {
|
||||
div_t qr = div(value, radix);
|
||||
dest[--digits] = (qr.rem >= 10 ? 'A' : '0') + qr.rem;
|
||||
dest[--idx] = (qr.rem >= 10 ? 'A'-10 : '0') + qr.rem;
|
||||
value = qr.quot;
|
||||
}
|
||||
return dest + digits;
|
||||
dest[digits] = '\0';
|
||||
return &dest[digits];
|
||||
}
|
||||
|
||||
#if defined(CPUARM) || defined(SDCARD)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue