Skip to content

Commit

Permalink
Merge pull request #125 from slwu89/hotfix/UBSCAN_error
Browse files Browse the repository at this point in the history
bitset$choose should never be passed negative number
  • Loading branch information
giovannic authored Jul 22, 2021
2 parents 4614118 + 77d579b commit a83ec90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/bitset.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Bitset <- R6Class(
choose = function(k) {
stopifnot(is.finite(k))
stopifnot(k <= bitset_size(self$.bitset))
stopifnot(k >= 0)
if (k < self$max_size) {
bitset_choose(self$.bitset, as.integer(k))
}
Expand Down

0 comments on commit a83ec90

Please sign in to comment.