Skip to content

Commit

Permalink
fix event tape too
Browse files Browse the repository at this point in the history
  • Loading branch information
codeblooded1729 committed Jun 17, 2024
1 parent aacbed1 commit 9c5cac2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sdk/src/common/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ fn populate_event_tape(self_prog_id: ProgramIdentifier) -> EventTapeType {
event_tape_read(&mut len_bytes);

let len: usize = u32::from_le_bytes(len_bytes).try_into().unwrap();
let buf: &'static mut Vec<u8> = Box::leak(Box::new(vec![0; len]));
let buf: &'static mut AlignedVec = Box::leak(Box::new(AlignedVec::with_capacity(len)));
unsafe {
buf.set_len(len);
}
event_tape_read(buf);

let canonical_ordered_temporal_hints =
Expand Down

0 comments on commit 9c5cac2

Please sign in to comment.