From ada329e63fef06fed3e663573ed5108b897dd450 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 1 Aug 2001 08:29:28 +0000 Subject: [PATCH] (strout): Treat the characters at *ptr as unsigned char. --- src/ChangeLog | 5 +++++ src/print.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 459bbe31de9..0619e0b24dd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-08-01 Eli Zaretskii + + * print.c (strout): Cast the character passed to insert_char to + unsigned char, to avoid sign extension when it is promoted to int. + 2001-07-31 Gerd Moellmann * fileio.c (Finsert_file_contents): Don't treat a return value diff --git a/src/print.c b/src/print.c index 2fa74543c43..bd0546895f6 100644 --- a/src/print.c +++ b/src/print.c @@ -401,7 +401,7 @@ strout (ptr, size, size_byte, printcharfun, multibyte) if (size == size_byte) { for (i = 0; i < size; ++i) - insert_char (*ptr++); + insert_char ((unsigned char )*ptr++); } else { -- 2.39.2