From ef31e3688c7db78cde13ea13eef94a4cccacaec6 Mon Sep 17 00:00:00 2001 From: ehouse Date: Thu, 27 Sep 2007 02:56:35 +0000 Subject: [PATCH] fix log_hex to print nibbles in right order. --- xwords4/common/strutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xwords4/common/strutils.c b/xwords4/common/strutils.c index 42343efae..85729e125 100644 --- a/xwords4/common/strutils.c +++ b/xwords4/common/strutils.c @@ -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 ) { XP_U8 byte = memp[offset]; for ( j = 0; j < 2; ++j ) { - *valsp++ = hex[byte & 0x0F]; - byte >>= 4; + *valsp++ = hex[(byte & 0xF0) >> 4]; + byte <<= 4; } *valsp++ = ':';