From: Guido van Rossum Date: Wed, 24 Oct 2007 21:13:09 +0000 (+0000) Subject: Fix a broken format in a PyErr_Format() call: %lx is not supported. X-Git-Tag: v3.0a2~280 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a2f7e60da093dcdea5d9e508f875285020019a6;p=thirdparty%2FPython%2Fcpython.git 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.) --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 61a23202e8f2..a24cdba41b91 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -4703,7 +4703,7 @@ int charmaptranslate_lookup(Py_UNICODE c, PyObject *mapping, PyObject **result) long max = PyUnicode_GetMax(); if (value < 0 || value > max) { 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); return -1; }