Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Feb 4, 2025
1 parent 04a6697 commit 0aefa4c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libwasmvm/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ impl U8SliceView {
match source {
Some(data) => Self {
is_none: false,
ptr: data.as_ptr(),
ptr: if data.is_empty() {
std::ptr::null::<u8>()
} else {
data.as_ptr()
},
len: data.len(),
},
None => Self {
Expand Down

0 comments on commit 0aefa4c

Please # to comment.