From 33e4ad0a98032ef77adcac218290a88c583e6f4a Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Mon, 18 May 2020 09:31:41 +0200 Subject: [PATCH] codegen: Use loop index instead of get_ccode_pos() for ellipsis parameter 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala index 904e6a83a..25effa396 100644 --- a/codegen/valaccodemethodcallmodule.vala +++ b/codegen/valaccodemethodcallmodule.vala @@ -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) { -- 2.47.2