Browse Source

Fix constant slice checking, again

gingerBill 5 năm trước cách đây
mục cha
commit
5af3c7b0e8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/check_expr.cpp

+ 1 - 1
src/check_expr.cpp

@@ -8826,7 +8826,7 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type
 					capacity = max_count;
 				}
 				i64 j = 0;
-				if (check_index_value(c, false, nodes[i], capacity, &j)) {
+				if (check_index_value(c, true, nodes[i], capacity, &j)) {
 					index = j;
 				}