aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 8ddae76..dd8fa44 100644
--- a/main.c
+++ b/main.c
@@ -965,7 +965,7 @@ struct AstNode* parse_relational_expr(struct Parser* p) {
} else if (op == TK_GE) {
next_token(p);
struct AstNode* rhs = parse_additive_expr(p);
- lhs = ast_new_binary_expr(TK_GE, rhs, lhs);
+ lhs = ast_new_binary_expr(TK_LE, rhs, lhs);
lhs->ty = type_new(TY_INT);
} else {
break;