From d53a8095573135caa8fce98e7c381753edbc7c70 Mon Sep 17 00:00:00 2001 From: MozirDmitriy Date: Thu, 28 Aug 2025 17:30:02 +0300 Subject: [PATCH] fix: channel_id range checks when channel_count is zero --- crates/core/src/constraint_system/channel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/constraint_system/channel.rs b/crates/core/src/constraint_system/channel.rs index 5c9a455d7..6031d0287 100644 --- a/crates/core/src/constraint_system/channel.rs +++ b/crates/core/src/constraint_system/channel.rs @@ -112,7 +112,7 @@ where direction, multiplicity, } = boundary; - if channel_id > max_channel_id { + if channel_id >= channel_count { return Err(Error::ChannelIdOutOfRange { max: max_channel_id, got: channel_id, @@ -132,7 +132,7 @@ where log_values_per_row, } = flush; - if channel_id > max_channel_id { + if channel_id >= channel_count { return Err(Error::ChannelIdOutOfRange { max: max_channel_id, got: channel_id,