Fix integer overflow in flex::resolve
This commit is contained in:
parent
0240c3981b
commit
bfe19193b9
1 changed files with 2 additions and 1 deletions
|
|
@ -63,7 +63,8 @@ where
|
|||
{
|
||||
let limits = limits.pad(padding);
|
||||
|
||||
let mut total_non_fill = spacing as f32 * (children.len() - 1) as f32;
|
||||
let mut total_non_fill =
|
||||
spacing as f32 * (children.len() as i32 - 1).max(0) as f32;
|
||||
let mut fill_sum = 0;
|
||||
|
||||
let mut nodes: Vec<Node> = Vec::with_capacity(children.len());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue