aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 14ff2fc..bb01776 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -815,6 +815,8 @@ printchar (c, stream, quoter)
int quoter;
{
+ c &= 0xFF; /* Avoid sign bit follies */
+
if ( c < 0x20 || /* Low control chars */
(c >= 0x7F && c < 0xA0) || /* DEL, High controls */
(sevenbit_strings && c >= 0x80)) { /* high order bit set */