diff --git a/vlib/bitfield/bitfield.v b/vlib/bitfield/bitfield.v index ab3c0b72a7..e6bd067632 100644 --- a/vlib/bitfield/bitfield.v +++ b/vlib/bitfield/bitfield.v @@ -112,7 +112,7 @@ pub fn new(size int) BitField { output := BitField{ size: size //field: *u32(calloc(bitnslots(size) * SLOT_SIZE / 8)) - field: [u32(0); bitnslots(size)] + field: [u32(0)].repeat(bitnslots(size)) } return output }