Skip to content

Commit

Permalink
Fix the alignment check in the adapter's allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt committed Oct 4, 2024
1 parent 3fa4243 commit 14d4800
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/adapter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ impl BumpAlloc {
unreachable!("invalid alignment");
}
let align_offset = self.base.align_offset(align);
if align_offset >= self.len {
if align_offset > self.len {
unreachable!("failed to allocate")
}
self.len -= align_offset;
Expand Down
Binary file modified lib/data/viceroy-component-adapter.wasm
Binary file not shown.

0 comments on commit 14d4800

Please sign in to comment.