Fix SF bug #1072182, problems with signed characters.

Most of these can be backported.
This commit is contained in:
Neal Norwitz 2005-12-19 06:05:18 +00:00
parent 5d0ad50f5a
commit 30b5c5d011
11 changed files with 16 additions and 14 deletions

View file

@ -506,7 +506,8 @@ set_error(void)
if (strlen(outbuf) > 0) {
/* If non-empty msg, trim CRLF */
char *lastc = &outbuf[ strlen(outbuf)-1 ];
while (lastc > outbuf && isspace(*lastc)) {
while (lastc > outbuf &&
isspace(Py_CHARMASK(*lastc))) {
/* Trim trailing whitespace (CRLF) */
*lastc-- = '\0';
}