mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-02 14:57:43 +03:00
Fix bug in get_payload (#389)
This commit is contained in:
@ -135,7 +135,7 @@ impl<'a> FatbinFile<'a> {
|
||||
}
|
||||
|
||||
pub unsafe fn get_payload(&'a self) -> &'a [u8] {
|
||||
let start = std::ptr::from_ref(self)
|
||||
let start = std::ptr::from_ref(self.header)
|
||||
.cast::<u8>()
|
||||
.add(self.header.header_size as usize);
|
||||
std::slice::from_raw_parts(start, self.header.payload_size as usize)
|
||||
|
Reference in New Issue
Block a user