summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-04-06 18:18:10 (GMT)
committerGuido van Rossum <guido@python.org>2000-04-06 18:18:10 (GMT)
commitba47704943137318229ad9a4bba6a93aa0ba1d29 (patch)
treec8018e8f07be7fbfe585e70e57f3b530166ec316 /Objects
parent69ca950d1ff6a5344f1680846af85facfdf7bc14 (diff)
downloadcpython-ba47704943137318229ad9a4bba6a93aa0ba1d29.zip
cpython-ba47704943137318229ad9a4bba6a93aa0ba1d29.tar.gz
cpython-ba47704943137318229ad9a4bba6a93aa0ba1d29.tar.bz2
Conrad Huang points out that "if (0 < ch < 256)", while legal C,
doesn't mean what the Python programmer thought...
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index b876f34..e4bbcff 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1958,7 +1958,7 @@ int PyUnicode_EncodeDecimal(Py_UNICODE *s,
*output++ = '0' + decimal;
continue;
}
- if (0 < ch < 256) {
+ if (0 < ch && ch < 256) {
*output++ = (char) ch;
continue;
}