mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
bf: fix resize()
This commit is contained in:
parent
dcc42c858b
commit
6dcdb224a1
@ -486,7 +486,7 @@ pub fn (instance mut BitField) resize(size int) {
|
|||||||
for i := 0; i < old_bitnslots && i < new_bitnslots; i++ {
|
for i := 0; i < old_bitnslots && i < new_bitnslots; i++ {
|
||||||
field[i] = instance.field[i]
|
field[i] = instance.field[i]
|
||||||
}
|
}
|
||||||
instance.field = field
|
instance.field = field.clone()
|
||||||
instance.size = size
|
instance.size = size
|
||||||
if size < old_size && size % SLOT_SIZE != 0 {
|
if size < old_size && size % SLOT_SIZE != 0 {
|
||||||
cleartail(mut instance)
|
cleartail(mut instance)
|
||||||
|
Loading…
Reference in New Issue
Block a user