Skip to content

Commit

Permalink
Merge pull request #951 from RobinD42/fix-issue950
Browse files Browse the repository at this point in the history
Use correct format char when creating overflow exception.
  • Loading branch information
RobinD42 committed Aug 5, 2018
2 parents b297b55 + c365ec2 commit 482af90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sip/siplib/siplib.c
Expand Up @@ -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
}
Expand Down

0 comments on commit 482af90

Please sign in to comment.