From 4b5afe3456eff35028cf2a7a78a4bb60fb43c618 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 5 Feb 2013 17:54:14 +0100 Subject: [PATCH] ast_array_index_codegen: never regenerate code --- ast.c | 2 ++ parser.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ast.c b/ast.c index 4eb250f..2a3997b 100644 --- a/ast.c +++ b/ast.c @@ -2183,9 +2183,11 @@ bool ast_array_index_codegen(ast_array_index *self, ast_function *func, bool lva if (!lvalue && self->expression.outr) { *out = self->expression.outr; + return true; } if (lvalue && self->expression.outl) { *out = self->expression.outl; + return true; } if (!ast_istype(self->array, ast_value)) { diff --git a/parser.c b/parser.c index 81bbbcb..e9cbe0a 100644 --- a/parser.c +++ b/parser.c @@ -1067,7 +1067,7 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy) out = (ast_expression*)ast_ternary_new(ctx, exprs[0], exprs[1], exprs[2]); break; - case opid3('<', '=', '>'): /* -1, 0, or 1 */ + case opid3('<','=','>'): /* -1, 0, or 1 */ if (NotSameType(TYPE_FLOAT)) { ast_type_to_string(exprs[0], ty1, sizeof(ty1)); ast_type_to_string(exprs[1], ty2, sizeof(ty2)); -- 2.39.2