noun: fix new_raw_mut_bytearray bitshift direction

This commit is contained in:
Matthew LeVan 2024-02-02 10:01:43 -05:00
parent c0ca1813a8
commit dc4cb73f9e

View File

@ -440,7 +440,7 @@ impl IndirectAtom {
pub unsafe fn new_raw_mut_bytearray<'a, const N: usize, A: NounAllocator>(
allocator: &mut A,
) -> (Self, &'a mut [u8; N]) {
let word_size = (std::mem::size_of::<[u8; N]>() + 7) << 3;
let word_size = (std::mem::size_of::<[u8; N]>() + 7) >> 3;
let (noun, ptr) = Self::new_raw_mut_zeroed(allocator, word_size);
(noun, &mut *(ptr as *mut [u8; N]))
}