Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Oct 7, 2024
1 parent 43e8b4d commit c2536d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bitset.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ func From(buf []uint64) *BitSet {
// As a user of FromWithLength, you are responsible for ensuring
// that the length is correct: your slice should have length at
// least (len+63)/64 in 64-bit words.
func FromWithLength(len uint, set []uint64) *BitSet {
if uint(len(set)) < wordsNeeded(len) {
func FromWithLength(length uint, set []uint64) *BitSet {
if len(set) < wordsNeeded(length) {
panic("BitSet.FromWithLength: slice is too short")
}
return &BitSet{len, set}
return &BitSet{length, set}
}

// Bytes returns the bitset as array of 64-bit words, giving direct access to the internal representation.
Expand Down

0 comments on commit c2536d3

Please sign in to comment.