aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/printf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-16 12:16:55 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-16 12:16:55 +0100
commit92a519277eab48c3f624157045e88b3d02c97f86 (patch)
tree4bf7da942881914a5fe45accf58d1280bdc0a998 /src/libutil/printf.c
parent433b67796b1ddeb3e4e06b6988a0c787e9caf6bd (diff)
downloadrspamd-92a519277eab48c3f624157045e88b3d02c97f86.tar.gz
rspamd-92a519277eab48c3f624157045e88b3d02c97f86.zip
[Fix] Fix hex printing of strings
Diffstat (limited to 'src/libutil/printf.c')
-rw-r--r--src/libutil/printf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libutil/printf.c b/src/libutil/printf.c
index a0b75f5bd..10dc899ba 100644
--- a/src/libutil/printf.c
+++ b/src/libutil/printf.c
@@ -602,9 +602,9 @@ rspamd_vprintf_common (rspamd_printf_append_func func,
gchar hexbuf[2];
while (slen) {
- hexbuf[0] = hex == 2 ? _HEX[*p & 0xf] : _hex[*p & 0xf];
- hexbuf[1] = hex == 2 ? _HEX[(*p >> 4) & 0xf] :
- _hex[(*p >> 4) & 0xf];
+ hexbuf[0] = hex == 2 ? _HEX[(*p >> 4) & 0xf] :
+ _hex[(*p >> 4) & 0xf];
+ hexbuf[1] = hex == 2 ? _HEX[*p & 0xf] : _hex[*p & 0xf];
RSPAMD_PRINTF_APPEND_BUF (hexbuf, 2);
p++;
slen--;