]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.c
Allow testsuite to pass on big endian
[xonotic/gmqcc.git] / parser.c
index 956d88dd5e76d214b9a7b368314ec7137c8a223d..eaa14903d7681416e69b53fdbbc76c121bc678a0 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4407,6 +4407,7 @@ static bool parser_create_array_accessor(parser_t *parser, ast_value *array, con
         parseerror(parser, "failed to create accessor function value");
         return false;
     }
+    fval->expression.flags &= ~(AST_FLAG_COVERAGE_MASK);
 
     func = ast_function_new(ast_ctx(array), funcname, fval);
     if (!func) {
@@ -6245,6 +6246,7 @@ void parser_cleanup(parser_t *parser)
 }
 
 static bool parser_set_coverage_func(parser_t *parser, ir_builder *ir) {
+    size_t          i;
     ast_expression *expr;
     ast_value      *cov;
     ast_function   *func;
@@ -6253,7 +6255,7 @@ static bool parser_set_coverage_func(parser_t *parser, ir_builder *ir) {
         return true;
 
     func = NULL;
-    for (size_t i = 0; i != vec_size(parser->functions); ++i) {
+    for (i = 0; i != vec_size(parser->functions); ++i) {
         if (!strcmp(parser->functions[i]->name, "coverage")) {
             func = parser->functions[i];
             break;