Skip to content

Commit 198756b

Browse files
gh-117376: Fix off-by-ones in conversion functions (GH-124301)
Fix off-by-ones in conversion function
1 parent c1600c7 commit 198756b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3928,7 +3928,7 @@ dummy_func(
39283928
PyCFunctionFastWithKeywords cfunc =
39293929
(PyCFunctionFastWithKeywords)(void(*)(void))meth->ml_meth;
39303930

3931-
STACKREFS_TO_PYOBJECTS(args, nargs, args_o);
3931+
STACKREFS_TO_PYOBJECTS(args, total_args, args_o);
39323932
if (CONVERSION_FAILED(args_o)) {
39333933
DECREF_INPUTS();
39343934
ERROR_IF(true, error);
@@ -4009,7 +4009,7 @@ dummy_func(
40094009
(PyCFunctionFast)(void(*)(void))meth->ml_meth;
40104010
int nargs = total_args - 1;
40114011

4012-
STACKREFS_TO_PYOBJECTS(args, nargs, args_o);
4012+
STACKREFS_TO_PYOBJECTS(args, total_args, args_o);
40134013
if (CONVERSION_FAILED(args_o)) {
40144014
DECREF_INPUTS();
40154015
ERROR_IF(true, error);

Python/executor_cases.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)