diff options
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 3391405..038bd1f 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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'; } |