Conrad Huang points out that "if (0 < ch < 256)", while legal C,

doesn't mean what the Python programmer thought...
This commit is contained in:
Guido van Rossum 2000-04-06 18:18:10 +00:00
parent 69ca950d1f
commit ba47704943
1 changed files with 1 additions and 1 deletions

View File

@ -1958,7 +1958,7 @@ int PyUnicode_EncodeDecimal(Py_UNICODE *s,
*output++ = '0' + decimal; *output++ = '0' + decimal;
continue; continue;
} }
if (0 < ch < 256) { if (0 < ch && ch < 256) {
*output++ = (char) ch; *output++ = (char) ch;
continue; continue;
} }