bevy/crates/bevy_mesh
Stepan Koltsov 928dee830e
Indices::extend (#16023)
# Objective

There's integer overflow in `Mesh::merge` in branches like this:


405fa3e8ea/crates/bevy_mesh/src/mesh.rs (L857-L859)

we truncate `u32` to `u16` and ignore integer overflow on `u16`. This
may lead to unexpected results when the number of vertices exceeds
`u16::MAX`.

## Solution

Convert indices storage to `u32` when necessary.

## Testing

- Unit test added for `extend` function
- For changes in `Mesh`, I presume it is already tested elsewhere
2024-10-31 16:39:32 +00:00
..
src Indices::extend (#16023) 2024-10-31 16:39:32 +00:00
Cargo.toml Remove thiserror from bevy_mesh (#15768) 2024-10-09 14:24:54 +00:00