]> 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>
Tue, 19 May 2020 14:54:17 +0000 (16:54 +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 2160125942a8ff270d162f35224e508bbf2666e4..2b7cefb4ac653b8e11e78f77f6d9da5aae2d7cf4 100644 (file)
@@ -482,7 +482,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 (arg is NamedArgument && ellipsis) {