1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 18:56:39 +02:00

(print_it): Don't assume char is unsigned.

This commit is contained in:
Paul Eggert
2006-07-09 17:07:12 +00:00
parent b35b31b0f8
commit b3e1ad7a5d

View File

@@ -653,13 +653,13 @@ print_it (char const *format, char const *filename,
putchar (esc_value);
--b;
}
else if (*b == 'x' && ISXDIGIT (b[1]))
else if (*b == 'x' && isxdigit (to_uchar (b[1])))
{
int esc_value = hextobin (b[1]); /* Value of \xhh escape. */
/* A hexadecimal \xhh escape sequence must have
1 or 2 hex. digits. */
++b;
if (ISXDIGIT (b[1]))
if (isxdigit (to_uchar (b[1])))
{
++b;
esc_value = esc_value * 16 + hextobin (*b);