ensure first and last bits are included when all-bit-i is set

This commit is contained in:
2025-10-20 19:04:54 +02:00
parent 7ef7f653b7
commit c7c777f5fa

View File

@@ -407,6 +407,11 @@
indices.push(r.start) indices.push(r.start)
indices.push(r.end) indices.push(r.end)
} }
// ensure first and last bits are included
if not indices.contains(0) { indices.insert(0, struct.start) }
if not indices.contains(struct.bits + struct.start - 1) {
indices.push(struct.bits + struct.start - 1)
}
} }
for i in range(struct.bits) { for i in range(struct.bits) {