Explorar o código

aya: fix program array key size

Alessandro Decina %!s(int64=4) %!d(string=hai) anos
pai
achega
b6cd813af5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      aya/src/maps/array/program_array.rs

+ 1 - 1
aya/src/maps/array/program_array.rs

@@ -55,7 +55,7 @@ impl<T: Deref<Target = Map>> ProgramArray<T> {
                 map_type: map_type as u32,
             })?;
         }
-        let expected = mem::size_of::<RawFd>();
+        let expected = mem::size_of::<u32>();
         let size = map.obj.def.key_size as usize;
         if size != expected {
             return Err(MapError::InvalidKeySize { size, expected });