[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] Send C_DEBUGGER_REPLY_GET_BYTES responses as u
From: |
Evan Hanson |
Subject: |
[Chicken-hackers] [PATCH] Send C_DEBUGGER_REPLY_GET_BYTES responses as unsigned char values |
Date: |
Fri, 4 Mar 2016 14:03:14 +1300 |
This allows the client to consider the stream as a written u8vector,
without needing to mask off the extra bits of any elements outside the
byte range.
---
dbg-stub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dbg-stub.c b/dbg-stub.c
index 96227de..bbfa3c5 100644
--- a/dbg-stub.c
+++ b/dbg-stub.c
@@ -381,7 +381,7 @@ send_event(int event, C_char *loc, C_char *val, C_char
*cloc, int cln)
send_string(rw_buffer);
for(n = 0; n < reply; ++n) {
- sprintf(rw_buffer, " %lu", (unsigned long)((char
*)C_data_pointer(x))[ n ]);
+ sprintf(rw_buffer, " %u", ((unsigned char *)C_data_pointer(x))[ n ]);
send_string(rw_buffer);
}
--
2.7.0.rc3
- [Chicken-hackers] [PATCH] Send C_DEBUGGER_REPLY_GET_BYTES responses as unsigned char values,
Evan Hanson <=