From: Vsevolod Stakhov Date: Tue, 9 Feb 2016 16:33:23 +0000 (+0000) Subject: Fix error in printing hex X-Git-Tag: 1.2.0~272 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dcbe3146b882a731e1cd82025607bd423bb82024;p=rspamd.git Fix error in printing hex --- diff --git a/src/libutil/printf.c b/src/libutil/printf.c index 29ca8cfb1..a0b75f5bd 100644 --- a/src/libutil/printf.c +++ b/src/libutil/printf.c @@ -603,8 +603,8 @@ rspamd_vprintf_common (rspamd_printf_append_func func, while (slen) { hexbuf[0] = hex == 2 ? _HEX[*p & 0xf] : _hex[*p & 0xf]; - hexbuf[1] = hex == 2 ? _HEX[(*p >> 8) & 0xf] : - _hex[(*p >> 8) & 0xf]; + hexbuf[1] = hex == 2 ? _HEX[(*p >> 4) & 0xf] : + _hex[(*p >> 4) & 0xf]; RSPAMD_PRINTF_APPEND_BUF (hexbuf, 2); p++; slen--;