3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-30 13:19:05 +00:00

Fix off-by-one error in bounds check

This commit is contained in:
Robert O'Callahan 2025-09-17 22:27:16 +00:00
parent 13a2481da7
commit 0a17205a95

View file

@ -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;