array-field setter needs to use STOREP*

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-12 23:05:44 +01:00
parent 0340a6a6e7
commit dbdcdb059e

View file

@ -2344,10 +2344,10 @@ static ast_expression *array_field_setter_node(
ast_return *ret;
ast_entfield *entfield;
ast_array_index *subscript;
int assignop = type_store_instr[value->expression.vtype];
int assignop = type_storep_instr[value->expression.vtype];
if (value->expression.vtype == TYPE_FIELD && value->expression.next->expression.vtype == TYPE_VECTOR)
assignop = INSTR_STORE_V;
assignop = INSTR_STOREP_V;
subscript = ast_array_index_new(ctx, (ast_expression*)array, (ast_expression*)parser_const_float(parser, from));
if (!subscript)