diff options
Diffstat (limited to 'Objects/call.c')
-rw-r--r-- | Objects/call.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/call.c b/Objects/call.c index 4294a9b..9246432 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -854,9 +854,9 @@ _PyObject_FastCall_Prepend(PyObject *callable, /* use borrowed references */ args2[0] = obj; - memcpy(&args2[1], - args, - (nargs - 1)* sizeof(PyObject *)); + if (nargs > 1) { + memcpy(&args2[1], args, (nargs - 1) * sizeof(PyObject *)); + } result = _PyObject_FastCall(callable, args2, nargs); if (args2 != small_stack) { |