ctype bug

Matthew Dillon dillon at apollo.backplane.com
Tue Jul 5 23:22:25 PDT 2005


    Whoops, we have a problem with the ctype code... it is not properly
    folding negative integers (i.e. when a signed char is passed to 
    an is*() function).

    The is*() functions are returning non-zero for all negative numbers,
    which is wrong.

						-Matt

main()
{
    int c;

    for (c = -128; c < 256; ++c) {
        if (isprint(c))
            printf("%02x %c\n", (unsigned char)c, c);
    }
    return(0);
}







More information about the Commits mailing list