aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/printf.c')
-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--;