Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratysz authored and mrk-its committed Oct 6, 2020
1 parent 7fde50c commit baf23b7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/bevy_ecs/hecs/src/archetype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,14 @@ impl Archetype {
new_data.as_ptr().add(new_off),
ty.layout.size() * old_count,
);
dealloc(
(*self.data.get()).as_ptr().cast(),
Layout::from_size_align_unchecked(
old_data_size,
self.types.first().map_or(1, |x| x.layout.align()),
),
);
}
dealloc(
(*self.data.get()).as_ptr().cast(),
Layout::from_size_align_unchecked(
old_data_size,
self.types.first().map_or(1, |x| x.layout.align()),
),
);
}

self.data = UnsafeCell::new(new_data);
Expand Down

0 comments on commit baf23b7

Please sign in to comment.