From: Dale Weiler Date: Sun, 26 Nov 2017 22:47:27 +0000 (-0500) Subject: don't generate storep for vector field unless it's an ent field X-Git-Tag: xonotic-v0.8.5~30 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b14a02e735f8b7bed773d397a35b6fda1e2a368d;p=xonotic%2Fgmqcc.git don't generate storep for vector field unless it's an ent field --- diff --git a/parser.cpp b/parser.cpp index 0560849..63e49d0 100644 --- a/parser.cpp +++ b/parser.cpp @@ -296,7 +296,11 @@ static bool rotate_entfield_array_index_nodes(ast_expression **out) 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)) {