From 52c6680bc3c2ee2df793ccf10f7f4be97be2dae9 Mon Sep 17 00:00:00 2001
From: Martin Szulecki
Date: Sat, 13 Jul 2013 16:40:13 +0200
Subject: common: Fix malformed binary debug message dumping

---
 common/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/debug.c b/common/debug.c
index 67e2fc2..ad726d1 100644
--- a/common/debug.c
+++ b/common/debug.c
@@ -116,7 +116,7 @@ inline void debug_buffer(const char *data, const int length)
 					fprintf(stderr, "   ");
 					continue;
 				}
-				fprintf(stderr, "%02x ", *(data + i + j));
+				fprintf(stderr, "%02x ", *(data + i + j) & 0xff);
 			}
 			fprintf(stderr, "  | ");
 			for (j = 0; j < 16; j++) {
-- 
cgit v1.1-32-gdbae