summaryrefslogtreecommitdiff
path: root/demo/console.c
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-10-04 03:46:29 -0600
committerAlejandro Soto <alejandro@34project.org>2023-10-04 05:04:04 -0600
commitf52299cf837951cbc1dc92fd0d084444ac3dc712 (patch)
tree81db03717f1571d0e1e75f8de8d7915a0c7cb084 /demo/console.c
parent3de2c7e7dd214f80b8b9cca575e42e0b1b08034d (diff)
demo: implement cache debug
Diffstat (limited to '')
-rw-r--r--demo/console.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/demo/console.c b/demo/console.c
index b35ace7..d2d13fa 100644
--- a/demo/console.c
+++ b/demo/console.c
@@ -48,7 +48,8 @@ static void print_hex(unsigned val, unsigned bits)
if (bits > 32)
bits = 32;
- bits = bits & ~3;
+ bits = (bits + 3) & ~3;
+
do
print_char(hex_digits[(val >> (bits -= 4)) & 0xf]);
while (bits);