diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-16 12:16:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-16 12:16:55 +0100 |
commit | 92a519277eab48c3f624157045e88b3d02c97f86 (patch) | |
tree | 4bf7da942881914a5fe45accf58d1280bdc0a998 /src/libutil/printf.c | |
parent | 433b67796b1ddeb3e4e06b6988a0c787e9caf6bd (diff) | |
download | rspamd-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.c | 6 |
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--; |