Espresso 0.0.2a
This commit is contained in:
@ -301,14 +301,14 @@ void print_lint(int64_t value)
|
||||
void print_hex(uint32_t value, int width, bool uppercase)
|
||||
{
|
||||
const char* hex_chars = uppercase ? "0123456789ABCDEF" : "0123456789abcdef";
|
||||
char buffer[9]; // 8 hex digits max for 32-bit
|
||||
char buffer[9]; /* 8 hex digits max for 32-bit */
|
||||
int i = 0;
|
||||
|
||||
do
|
||||
{
|
||||
buffer[i++] = hex_chars[value & 0xF];
|
||||
value >>= 4;
|
||||
} while (value || i < width); // ensure at least 'width' digits
|
||||
} while (value || i < width); /* ensure at least 'width' digits */
|
||||
|
||||
while (i--)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user