diff Modules/socketmodule.c @ 36090:8cb686dd6e64 legacy-trunk

Fix SF bug #1072182, problems with signed characters. Most of these can be backported.
author Neal Norwitz <nnorwitz@gmail.com>
date Mon, 19 Dec 2005 06:05:18 +0000
parents 9541369b0dca
children ae4480935016
line wrap: on
line diff
--- a/Modules/socketmodule.c	Mon Dec 19 04:27:42 2005 +0000
+++ b/Modules/socketmodule.c	Mon Dec 19 06:05:18 2005 +0000
@@ -506,7 +506,8 @@
 			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';
 				}