]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
ast_array_index_codegen: never regenerate code
authorWolfgang Bumiller <blub@speed.at>
Tue, 5 Feb 2013 16:54:14 +0000 (17:54 +0100)
committerWolfgang Bumiller <blub@speed.at>
Tue, 5 Feb 2013 16:54:14 +0000 (17:54 +0100)
ast.c
parser.c

diff --git a/ast.c b/ast.c
index 4eb250fad19c360756aae26a362d5cc063bdbe3f..2a3997b952cab38d3c9017949dd612c7067c7cc8 100644 (file)
--- 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)) {
index 81bbbcbcba2cc8bd58e74eb16e436337bd7643b2..e9cbe0a031c81dc723cf5ff4cecbb7ab7dc96380 100644 (file)
--- 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));