From f0687adbaa3b23b2fc93295105218e9d1151eab4 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Mon, 17 Dec 2012 15:56:55 +0100 Subject: [PATCH] Error when the assignop for an assignment is invalid, eg. when trying to assign arrays --- parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parser.c b/parser.c index 84413fd..4a1933b 100644 --- a/parser.c +++ b/parser.c @@ -926,7 +926,9 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy) } else assignop = type_storep_instr[exprs[0]->expression.vtype]; - if (!ast_compare_type(field->expression.next, exprs[1])) { + if (assignop == AINSTR_END || + !ast_compare_type(field->expression.next, exprs[1])) + { ast_type_to_string(field->expression.next, ty1, sizeof(ty1)); ast_type_to_string(exprs[1], ty2, sizeof(ty2)); if (OPTS_FLAG(ASSIGN_FUNCTION_TYPES) &&