From: Eli Zaretskii Date: Wed, 1 Aug 2001 08:29:28 +0000 (+0000) Subject: (strout): Treat the characters at *ptr as unsigned char. X-Git-Tag: emacs-pretest-21.0.105~340 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ada329e63fef06fed3e663573ed5108b897dd450;p=emacs.git (strout): Treat the characters at *ptr as unsigned char. --- 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 {