mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-25 11:48:41 +00:00
Fix bug in get_payload (#389)
This commit is contained in:
parent
4da3978f94
commit
f4cd545677
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue