aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-09 16:33:23 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-10 23:10:49 +0000
commit0599a124af1af62856de693522655ac18b4bbfb9 (patch)
tree922bc39a262ea80234b21ac8798c7453fce715ab
parent85391569ec996bf0523517d958c7082d1779b09c (diff)
downloadrspamd-0599a124af1af62856de693522655ac18b4bbfb9.tar.gz
rspamd-0599a124af1af62856de693522655ac18b4bbfb9.zip
Fix error in printing hex
-rw-r--r--src/libutil/printf.c4
1 files changed, 2 insertions, 2 deletions
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--;