[vala/0.48] codegen: Use loop index instead of get_ccode_pos() for ellipsis parameter
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] codegen: Use loop index instead of get_ccode_pos() for ellipsis parameter
- Date: Mon, 18 May 2020 12:38:42 +0000 (UTC)
commit 28f385901b6d60b9f059eccff5580216e2916175
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon May 18 09:31:41 2020 +0200
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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]