mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Fix a broken format in a PyErr_Format() call: %lx is not supported.
(It's still technically broken since the va_args code assumes %x is an int while we're passing a long, but that's mostly theoretical, and it's done all over the place.)
This commit is contained in:
parent
52ddaefb6b
commit
5a2f7e60da
1 changed files with 1 additions and 1 deletions
|
@ -4703,7 +4703,7 @@ int charmaptranslate_lookup(Py_UNICODE c, PyObject *mapping, PyObject **result)
|
||||||
long max = PyUnicode_GetMax();
|
long max = PyUnicode_GetMax();
|
||||||
if (value < 0 || value > max) {
|
if (value < 0 || value > max) {
|
||||||
PyErr_Format(PyExc_TypeError,
|
PyErr_Format(PyExc_TypeError,
|
||||||
"character mapping must be in range(0x%lx)", max+1);
|
"character mapping must be in range(0x%x)", max+1);
|
||||||
Py_DECREF(x);
|
Py_DECREF(x);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue