]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
fix the INCLUDE_DEF flag getting applied regardless of dotranslate...
authorWolfgang Bumiller <wry.git@bumiller.com>
Sat, 1 Jun 2013 18:12:14 +0000 (20:12 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Sat, 1 Jun 2013 18:12:14 +0000 (20:12 +0200)
parser.c

index 1b9e7c71a018039a8ad632d8046856bc308ba24b..c6819223cb279d4233ff8af9db6de883d31469ca 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -280,12 +280,12 @@ static ast_value* parser_const_string(parser_t *parser, const char *str, bool do
         char name[32];
         util_snprintf(name, sizeof(name), "dotranslate_%lu", (unsigned long)(parser->translated++));
         out = ast_value_new(parser_ctx(parser), name, TYPE_STRING);
+        out->expression.flags |= AST_FLAG_INCLUDE_DEF;
     } else
         out = ast_value_new(parser_ctx(parser), "#IMMEDIATE", TYPE_STRING);
     out->cvq      = CV_CONST;
     out->hasvalue = true;
     out->isimm    = true;
-    out->expression.flags |= AST_FLAG_INCLUDE_DEF;
     out->constval.vstring = parser_strdup(str);
     vec_push(parser->imm_string, out);
     util_htseth(parser->ht_imm_string, str, hash, out);