X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=parser.cpp;h=4f7ea699c5039537dcb9390c7180ca1127554986;hp=ddde65469ec77e7cb596e58451dc88096c5ad8f1;hb=1580c23556fea4089acf86462fdf28c281d93397;hpb=679e3771de1c016b30bb21da2823e2dc832c2e8a diff --git a/parser.cpp b/parser.cpp index ddde654..4f7ea69 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)) {