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:
parent
69ca950d1f
commit
ba47704943
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue