From ba47704943137318229ad9a4bba6a93aa0ba1d29 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 6 Apr 2000 18:18:10 +0000 Subject: Conrad Huang points out that "if (0 < ch < 256)", while legal C, doesn't mean what the Python programmer thought... --- Objects/unicodeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v0.12