From e3b16464908f2d6e85b7569ad4da6a802e3283c3 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 5 Dec 2024 15:46:35 +0000 Subject: [PATCH] Fix #4552 --- src/check_stmt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index e2d6f68fa..02ad72388 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -2605,6 +2605,7 @@ gb_internal void check_for_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags) { if (cond && cond->kind == Ast_BinaryExpr && cond->BinaryExpr.left && cond->BinaryExpr.right && cond->BinaryExpr.op.kind == Token_GtEq && + type_of_expr(cond->BinaryExpr.left) != nullptr && is_type_unsigned(type_of_expr(cond->BinaryExpr.left)) && cond->BinaryExpr.right->tav.value.kind == ExactValue_Integer && is_exact_value_zero(cond->BinaryExpr.right->tav.value)) {