From 38658ceba75abc704cf9f3533e4cfd0b14e2ae0f Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Mon, 8 Dec 2008 08:19:48 +0000 Subject: [PATCH] Correctly print octal escape sequences, when the char has negative value. [r24382] --- ast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ast.c b/ast.c index bf93a14..85c35c9 100644 --- a/ast.c +++ b/ast.c @@ -259,7 +259,7 @@ static void print_quoted_string(const string_t *const string, char border, int s /* FALLTHROUGH */ default: if (!isprint(*c)) { - fprintf(out, "\\%03o", (unsigned)*c); + fprintf(out, "\\%03o", (unsigned)(unsigned char)*c); break; } fputc(*c, out); -- 2.20.1