bpo-42065: Fix incorrectly formatted _codecs.charmap_decode error message (GH-19940)

This commit is contained in:
Max Bernstein 2020-10-17 13:38:21 -07:00 committed by GitHub
parent 975d10a4f8
commit 3635388f52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View file

@ -8304,7 +8304,7 @@ charmap_decode_mapping(const char *s,
goto Undefined;
if (value < 0 || value > MAX_UNICODE) {
PyErr_Format(PyExc_TypeError,
"character mapping must be in range(0x%lx)",
"character mapping must be in range(0x%x)",
(unsigned long)MAX_UNICODE + 1);
goto onError;
}