]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Merge branch 'master' of github.com:graphitemaster/gmqcc
authorDale Weiler <weilercdale@gmail.com>
Sun, 26 Nov 2017 22:48:13 +0000 (17:48 -0500)
committerDale Weiler <weilercdale@gmail.com>
Sun, 26 Nov 2017 22:48:13 +0000 (17:48 -0500)
1  2 
parser.cpp

diff --combined parser.cpp
index 63e49d056969f4b3360f697050722c67241f34a9,ddde65469ec77e7cb596e58451dc88096c5ad8f1..4f7ea699c5039537dcb9390c7180ca1127554986
@@@ -296,11 -296,7 +296,11 @@@ static bool rotate_entfield_array_index
  static int store_op_for(ast_expression* expr)
  {
      if (OPTS_FLAG(ADJUST_VECTOR_FIELDS) && expr->m_vtype == TYPE_FIELD && expr->m_next->m_vtype == TYPE_VECTOR) {
 -        return type_storep_instr[TYPE_VECTOR];
 +        if (ast_istype(expr, ast_entfield)) {
 +            return type_storep_instr[TYPE_VECTOR];
 +        } else {
 +            return type_store_instr[TYPE_VECTOR];
 +        }
      }
  
      if (ast_istype(expr, ast_member) && ast_istype(((ast_member*)expr)->m_owner, ast_entfield)) {
@@@ -3163,6 -3159,7 +3163,7 @@@ static bool parse_switch_go(parser_t *p
              }
              if (!OPTS_FLAG(RELAXED_SWITCH)) {
                  if (!ast_istype(swcase.m_value, ast_value)) { /* || ((ast_value*)swcase.m_value)->m_cvq != CV_CONST) { */
+                     delete switchnode;
                      parseerror(parser, "case on non-constant values need to be explicitly enabled via -frelaxed-switch");
                      ast_unref(operand);
                      return false;