Cast argument to unsigned char before feeding to ctype.h functions

The behavior of the `<ctype.h>` functions is undefined for negative
arguments (other than `EOF`). In such a situation, the argument should
be cast to `unsiged char` for safety.

References:
 - C Programming: A Modern Approach, 2nd Edition: page 612, chapter 23.5
This commit is contained in:
Lzu Tao
2018-11-06 05:39:14 +00:00
parent 4a992d91ab
commit 6c03383cd1

1016
mpc.c

File diff suppressed because it is too large Load Diff