diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-09-03 05:40:10 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-09-03 13:33:11 -0400 |
| commit | 001b2b9d8f021eb88db82d7a4cce47c6cdaf44de (patch) | |
| tree | d9b6c64590b66ecb803fecf018ec38631514627e /core/container/bit_array | |
| parent | 3da77bcd67d366b563ecf4064681bb4e2dd1d488 (diff) | |
Let `bit_array.create` make zero-length arrays
Diffstat (limited to 'core/container/bit_array')
| -rw-r--r-- | core/container/bit_array/bit_array.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/container/bit_array/bit_array.odin b/core/container/bit_array/bit_array.odin index b53bacda7..61119ef96 100644 --- a/core/container/bit_array/bit_array.odin +++ b/core/container/bit_array/bit_array.odin @@ -275,7 +275,7 @@ create :: proc(max_index: int, min_index: int = 0, allocator := context.allocato context.allocator = allocator size_in_bits := max_index - min_index - if size_in_bits < 1 { return {}, false } + if size_in_bits < 0 { return {}, false } legs := size_in_bits >> INDEX_SHIFT if size_in_bits & INDEX_MASK > 0 {legs+=1} |