]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
Don't try to add a slash to actual filenames, only paths...
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index 22081b5c5e0568dbf251213a7c9c5c464d894f6b..5a10154c44e1b237be43afc9cd9f36abe66bbebc 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -322,7 +322,7 @@ ast_value* ast_value_new(lex_ctx ctx, const char *name, int t)
     self->name = name ? util_strdup(name) : NULL;
     self->expression.vtype = t;
     self->expression.next  = NULL;
-    self->constant = false;
+    self->cvq      = CV_NONE;
     self->hasvalue = false;
     self->uses    = 0;
     memset(&self->constval, 0, sizeof(self->constval));
@@ -1270,6 +1270,7 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir, bool isfield)
     }
 
     /* link us to the ir_value */
+    v->cvq = self->cvq;
     self->ir_v = v;
     return true;
 
@@ -1374,6 +1375,7 @@ bool ast_local_codegen(ast_value *self, ir_function *func, bool param)
     }
 
     /* link us to the ir_value */
+    v->cvq = self->cvq;
     self->ir_v = v;
 
     if (self->setter) {