Fixed timer bug and other bugs about libc

This commit is contained in:
ice-bit
2019-07-08 12:01:01 +02:00
parent 47af4d2f59
commit 162bd743fd
6 changed files with 11 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ uint8_t *uitoa(uint32_t val, uint8_t *buf, uint32_t radix) {
uint32_t start = i;
uint32_t x = val;
if(radix == 10) {
if(radix == 16) {
buf[i++] = '0';
buf[i++] = 'x';
start = i;
@@ -67,7 +67,7 @@ uint8_t *uitoa(uint32_t val, uint8_t *buf, uint32_t radix) {
} while(x /= radix);
uint8_t *s = buf+start;
uint8_t *e = buf+(i+1);
uint8_t *e = buf+(i-1);
while(s < e) {
uint8_t t = *s;