summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 48fce5b..411e7f3 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -753,7 +753,8 @@ eval_code(co, globals, locals, owner, arg)
/* XXX move into writeobject() ? */
char *s = getstringvalue(v);
int len = getstringsize(v);
- if (len > 0 && isspace(s[len-1]) &&
+ if (len > 0 &&
+ isspace(Py_CHARMASK(s[len-1])) &&
s[len-1] != ' ')
softspace(w, 0);
}