(print_esc): Don't assume char is unsigned.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Jul 2006 17:06:35 +0000 (17:06 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Jul 2006 17:06:35 +0000 (17:06 +0000)
src/printf.c

index 8707f3e..2f29bc0 100644 (file)
@@ -1,5 +1,5 @@
 /* printf - format and print data
-   Copyright (C) 1990-2005 Free Software Foundation, Inc.
+   Copyright (C) 1990-2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -250,7 +250,7 @@ print_esc (const char *escstart, bool octal_0)
     {
       /* A hexadecimal \xhh escape sequence must have 1 or 2 hex. digits.  */
       for (esc_length = 0, ++p;
-          esc_length < 2 && ISXDIGIT (*p);
+          esc_length < 2 && isxdigit (to_uchar (*p));
           ++esc_length, ++p)
        esc_value = esc_value * 16 + hextobin (*p);
       if (esc_length == 0)
@@ -280,7 +280,7 @@ print_esc (const char *escstart, bool octal_0)
           esc_length > 0;
           --esc_length, ++p)
        {
-         if (!ISXDIGIT (*p))
+         if (! isxdigit (to_uchar (*p)))
            error (EXIT_FAILURE, 0, _("missing hexadecimal number in escape"));
          uni_value = uni_value * 16 + hextobin (*p);
        }