From b80e3f0dc3bd84c7c9ff8635f87033db71a9a64d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 4 Aug 2018 18:24:44 -0700 Subject: [PATCH] Use correct format char when creating overflow exception. (cherry picked from commit c365ec24bd6c316223e4036580f87eff7ad1359d) --- sip/siplib/siplib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sip/siplib/siplib.c b/sip/siplib/siplib.c index 23882be5..be69dbe2 100644 --- a/sip/siplib/siplib.c +++ b/sip/siplib/siplib.c @@ -5366,17 +5366,17 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp, PyErr_Format(PyExc_OverflowError, "argument %d overflowed: %S", failure.arg_nr, failure.detail_obj); #else - PyErr_Format(PyExc_OverflowError, "argument %s overflowed: %s", + PyErr_Format(PyExc_OverflowError, "argument %d overflowed: %s", failure.arg_nr, exc_str); #endif } else { #if PY_MAJOR_VERSION >= 3 - PyErr_Format(PyExc_OverflowError, "argument '%s' overflowed: %S", + PyErr_Format(PyExc_OverflowError, "argument '%d' overflowed: %S", failure.arg_nr, failure.detail_obj); #else - PyErr_Format(PyExc_OverflowError, "argument '%s' overflowed: %s", + PyErr_Format(PyExc_OverflowError, "argument '%d' overflowed: %s", failure.arg_nr, exc_str); #endif }