inclusive range

This commit is contained in:
Alex Dadgar
2016-08-15 13:13:04 -07:00
parent 8356dad7af
commit 47640507a8

View File

@@ -58,7 +58,7 @@ func (b Bitmap) Clear() {
// on the passed parameter in the passed range
func (b Bitmap) IndexesInRange(set bool, from, to uint) []int {
var indexes []int
for i := from; i < to; i++ {
for i := from; i <= to; i++ {
c := b.Check(i)
if c && set || !c && !set {
indexes = append(indexes, int(i))