fix log_hex to print nibbles in right order.

This commit is contained in:
ehouse 2007-09-27 02:56:35 +00:00
parent 57baefaf5f
commit 302abd3be5

View file

@ -249,8 +249,8 @@ log_hex( const XP_U8* memp, XP_U16 len, const char* tag )
for ( i = 0; i < NUM_PER_LINE && offset < len; ++i ) { for ( i = 0; i < NUM_PER_LINE && offset < len; ++i ) {
XP_U8 byte = memp[offset]; XP_U8 byte = memp[offset];
for ( j = 0; j < 2; ++j ) { for ( j = 0; j < 2; ++j ) {
*valsp++ = hex[byte & 0x0F]; *valsp++ = hex[(byte & 0xF0) >> 4];
byte >>= 4; byte <<= 4;
} }
*valsp++ = ':'; *valsp++ = ':';