This commit is contained in:
Greg Burd 2024-05-02 21:35:37 -04:00
parent a7754b05ba
commit 57a8f99a32
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -541,7 +541,9 @@ verify_sm_is_first_available_span(sparsemap_t *map, sparsemap_idx_t idx, size_t
while (sparsemap_is_set(map, i + j) == value && j < len) { while (sparsemap_is_set(map, i + j) == value && j < len) {
j++; j++;
} }
return i == idx; if (j == len) {
return i == idx;
}
} }
return false; return false;
} }

View file

@ -289,7 +289,7 @@ void sparsemap_split(sparsemap_t *map, sparsemap_idx_t offset, sparsemap_t *othe
* 3 when 0-based). * 3 when 0-based).
* *
* @param[in] map The sparsemap reference. * @param[in] map The sparsemap reference.
* @param[in] n Specifies how many bits to ignore (when n=3 return the position * @param[in] n Specifies how many bits to ignore (when n=2 return the position
* of the third matching bit). * of the third matching bit).
* @param[in] value Determines if the search is to examine set (true) or unset * @param[in] value Determines if the search is to examine set (true) or unset
* (false) bits in the bitmap index. * (false) bits in the bitmap index.