From 0a17205a955eb9eb95c2e89764d354b82bfc22f4 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Wed, 17 Sep 2025 22:27:16 +0000 Subject: [PATCH] Fix off-by-one error in bounds check --- kernel/rtlil.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 7d53fdd32..3c6843aaa 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -4399,7 +4399,7 @@ RTLIL::SigChunk RTLIL::SigChunk::extract(int offset, int length) const RTLIL::SigBit RTLIL::SigChunk::operator[](int offset) const { log_assert(offset >= 0); - log_assert(offset <= width); + log_assert(offset < width); RTLIL::SigBit ret; if (wire) { ret.wire = wire;