From 9b79b476a6a6c5776a5676c137bd7d64df4d738b Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Fri, 16 Apr 2010 08:12:59 +0000 Subject: [PATCH] * p-lang.c (pascal_one_char): Do not restrict C to 0..255 range. --- gdb/ChangeLog | 4 ++++ gdb/p-lang.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b424c7def6..c6465a0127 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-04-16 Pierre Muller + + * p-lang.c (pascal_one_char): Do not restrict C to 0..255 range. + 2010-04-16 Pierre Muller Support for Windows OS Thread Information Block. diff --git a/gdb/p-lang.c b/gdb/p-lang.c index 415cd99456..44aefa4a11 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -158,9 +158,7 @@ static void pascal_one_char (int c, struct ui_file *stream, int *in_quotes) { - c &= 0xFF; /* Avoid sign bit follies */ - - if ((c == '\'') || (PRINT_LITERAL_FORM (c))) + if (c == '\'' || ((unsigned int) c <= 0xff && (PRINT_LITERAL_FORM (c)))) { if (!(*in_quotes)) fputs_filtered ("'", stream);