diff options
-rw-r--r-- | src/helper/binarybuffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/binarybuffer.c b/src/helper/binarybuffer.c index a90ec7b0..b3e44916 100644 --- a/src/helper/binarybuffer.c +++ b/src/helper/binarybuffer.c @@ -393,7 +393,7 @@ int hexify(char *hex, const char *bin, int count, int out_maxlen) count = strlen(bin); for (i = 0; i < count; i++) - cmd_len += snprintf(hex + cmd_len, out_maxlen - cmd_len, "%02x", bin[i]); + cmd_len += snprintf(hex + cmd_len, out_maxlen - cmd_len, "%02x", bin[i] & 0xff); return cmd_len; } |