bf: fix resize()

pull/1900/head
Alexander Medvednikov 2019-09-08 16:10:59 +03:00
parent dcc42c858b
commit 6dcdb224a1
1 changed files with 1 additions and 1 deletions

View File

@ -486,7 +486,7 @@ pub fn (instance mut BitField) resize(size int) {
for i := 0; i < old_bitnslots && i < new_bitnslots; i++ {
field[i] = instance.field[i]
}
instance.field = field
instance.field = field.clone()
instance.size = size
if size < old_size && size % SLOT_SIZE != 0 {
cleartail(mut instance)