Commit a3051ccb by triazo

Fix bug in serial_hexword

parent dd9209b7
Showing with 1 additions and 1 deletions
...@@ -41,7 +41,7 @@ void serial_writestring(char* s) ...@@ -41,7 +41,7 @@ void serial_writestring(char* s)
const char* hexchars = "0123456789abcdef"; const char* hexchars = "0123456789abcdef";
void serial_hexword(uint32_t x) void serial_hexword(uint32_t x)
{ {
for (int i = 8; i != 0; i--) for (int i = 7; i >= 0; i--)
{ {
serial_writechar(hexchars[x>>i*4&0xf]); serial_writechar(hexchars[x>>i*4&0xf]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment