]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Use loop index instead of get_ccode_pos() for ellipsis parameter
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 18 May 2020 07:31:41 +0000 (09:31 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 18 May 2020 07:34:08 +0000 (09:34 +0200)
Otherwise this will cause an index clash resulting in loosing the first
variable list parameter.

Regression of b1cb7036bee1f21e98e93ac34b31a95eeed32815

Fixes https://gitlab.gnome.org/GNOME/vala/issues/995

codegen/valaccodemethodcallmodule.vala

index 904e6a83a5dae80b4ac68530e7c99bba1e7a370a..25effa396f61d191efb4de760762253b317b007c 100644 (file)
@@ -493,7 +493,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                                }
                        }
 
-                       arg_pos = get_param_pos (param != null ? get_ccode_pos (param) : i, ellipsis);
+                       arg_pos = get_param_pos (param != null && !ellipsis ? get_ccode_pos (param) : i, ellipsis);
                        carg_map.set (arg_pos, cexpr);
 
                        if (m is ArrayResizeMethod && context.profile == Profile.POSIX) {