Commit 82f4e982 authored by Guido van Rossum's avatar Guido van Rossum

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

doesn't mean what the Python programmer thought...
parent 23df61e7
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment