Browse Source

Fix constant slice checking, again

gingerBill 5 years ago
parent
commit
5af3c7b0e8
1 changed files with 1 additions and 1 deletions
  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;
 					capacity = max_count;
 				}
 				}
 				i64 j = 0;
 				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;
 					index = j;
 				}
 				}