]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Copy over the array-count in ast_type_adopt/ast_type_copy
authorWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 17 Dec 2012 14:59:22 +0000 (15:59 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 17 Dec 2012 15:00:08 +0000 (16:00 +0100)
ast.c

diff --git a/ast.c b/ast.c
index 46f05392501e6d73888dcac66fa83089a05b5225..90134134b255204e28baca3baa11e2e583ac59e0 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -109,6 +109,7 @@ ast_value* ast_value_copy(const ast_value *self)
     fromex   = &self->expression;
     selfex = &cp->expression;
     selfex->variadic = fromex->variadic;
+    selfex->count    = fromex->count;
     for (i = 0; i < vec_size(fromex->params); ++i) {
         ast_value *v = ast_value_copy(fromex->params[i]);
         if (!v) {
@@ -134,6 +135,7 @@ bool ast_type_adopt_impl(ast_expression *self, const ast_expression *other)
     fromex   = &other->expression;
     selfex = &self->expression;
     selfex->variadic = fromex->variadic;
+    selfex->count    = fromex->count;
     for (i = 0; i < vec_size(fromex->params); ++i) {
         ast_value *v = ast_value_copy(fromex->params[i]);
         if (!v)
@@ -185,6 +187,7 @@ ast_expression* ast_type_copy(lex_ctx ctx, const ast_expression *ex)
             selfex->next = NULL;
 
         selfex->variadic = fromex->variadic;
+        selfex->count    = fromex->count;
         for (i = 0; i < vec_size(fromex->params); ++i) {
             ast_value *v = ast_value_copy(fromex->params[i]);
             if (!v) {