Fix: lab3 on-board problems

This commit is contained in:
2025-04-01 23:38:06 +08:00
parent 2af52f761c
commit c211d8cde2
7 changed files with 62 additions and 21 deletions

View File

@@ -19,7 +19,7 @@ static inline char *_logger_string(char *dest, const char *src)
}
static inline char *_logger_hex(char *dest, uint64_t x)
{
for (int n, c = 28; c >= 0; c -= 4) {
for (int n, c = 60; c >= 0; c -= 4) {
n = (x >> c) & 0xf;
n += (n > 9) ? 0x37 : 0x30;
*dest++ = (char)n;