mirror of
https://github.com/urbit/ares.git
synced 2024-11-22 15:08:54 +03:00
noun: fix new_raw_mut_bytearray
bitshift direction
This commit is contained in:
parent
c0ca1813a8
commit
dc4cb73f9e
@ -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]))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user